diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2011-11-09 19:39:57 -0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-11 12:28:35 +0100 |
commit | e57f57a3d0e6aab2bfb16ec258aa49daab1e8fe2 (patch) | |
tree | 324eda71888c4304e5d314e6eaef8fd4866e5e5b /arch/x86/lib | |
parent | 8d6d5d43dde84b0352195a3ce6d0b9101e651073 (diff) | |
download | barebox-e57f57a3d0e6aab2bfb16ec258aa49daab1e8fe2.tar.gz barebox-e57f57a3d0e6aab2bfb16ec258aa49daab1e8fe2.tar.xz |
x86: fix symbol size calculation
The size is being calculated after changing to another section, which
gives error with gcc 4.6:
AS arch/x86/lib/traveler.o
/tmp/ccP0z8xx.s: Assembler messages:
/tmp/ccP0z8xx.s: Error: .size expression for real_to_prot does not evaluate to a constant
/tmp/ccP0z8xx.s: Error: .size expression for prot_to_real does not evaluate to a constant
make[1]: *** [arch/x86/lib/traveler.o] Error 1
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/traveler.S | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/lib/traveler.S b/arch/x86/lib/traveler.S index 06141955fd..4f7a9e399a 100644 --- a/arch/x86/lib/traveler.S +++ b/arch/x86/lib/traveler.S @@ -72,6 +72,7 @@ real_to_prot: /* jump to relocation, flush prefetch queue, and reload %cs */ DATA32 ljmp $__BOOT_CS, $return_to_flatmode + .size real_to_prot, .-real_to_prot /* ----------------------------------------------------------------------- */ .section .boot.text.return_to_flatmode, "ax" @@ -102,8 +103,7 @@ return_to_flatmode: /* flag we returned happy here */ xorl %eax, %eax ret - - .size real_to_prot, .-real_to_prot + .size return_to_flatmode, .-return_to_flatmode /* ------------------------------------------------------------------------ */ @@ -140,13 +140,16 @@ prot_to_real: /* at last, also limit the code segment to 16 bit */ ljmp $__REAL_CS, $return_to_realmode + .size prot_to_real, .-prot_to_real /* ----------------------------------------------------------------------- */ .section .boot.text.return_to_realmode, "ax" -return_to_realmode: + .globl return_to_realmode + .type return_to_realmode, @function .code16 +return_to_realmode: /* disable protected mode */ movl %cr0, %eax andl $(~0x00000001), %eax @@ -176,5 +179,5 @@ enter_realmode: /* return on realmode stack! */ DATA32 ret - .size prot_to_real, .-prot_to_real + .size return_to_realmode, .-return_to_realmode |