From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] x86: fix symbol size calculation
Date: Wed, 9 Nov 2011 19:39:57 -0200 [thread overview]
Message-ID: <1320874797-14270-5-git-send-email-lucas.demarchi@profusion.mobi> (raw)
In-Reply-To: <1320874797-14270-1-git-send-email-lucas.demarchi@profusion.mobi>
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>
---
arch/x86/boot/pmjump.S | 3 ++-
arch/x86/lib/traveler.S | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index d2fb8f0..09bfc6e 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -44,6 +44,7 @@ protected_mode_jump:
/* Transition to 32-bit flat mode */
data32 ljmp $__BOOT_CS, $in_pm32
+ .size protected_mode_jump, .-protected_mode_jump
/* ------------------------------------------------------------------------ */
@@ -83,5 +84,5 @@ in_pm32:
jmp uboot_entry
- .size protected_mode_jump, .-protected_mode_jump
+ .size in_pm32, .-in_pm32
diff --git a/arch/x86/lib/traveler.S b/arch/x86/lib/traveler.S
index 0614195..4f7a9e3 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
--
1.7.7.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-11-09 21:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 21:39 [PATCH 0/4] Fixes for x86 Lucas De Marchi
2011-11-09 21:39 ` [PATCH 1/4] Make fprintf return number of bytes written Lucas De Marchi
2011-11-10 10:53 ` Marc Kleine-Budde
2011-11-10 13:15 ` Lucas De Marchi
2011-11-10 13:20 ` Marc Kleine-Budde
2011-11-11 11:27 ` Sascha Hauer
2011-11-11 13:39 ` Lucas De Marchi
2011-11-09 21:39 ` [PATCH 2/4] Add setupmbr to gitignore Lucas De Marchi
2011-11-09 21:39 ` [PATCH 3/4] x86: fix build error because of missing header Lucas De Marchi
2011-11-09 21:39 ` Lucas De Marchi [this message]
2011-11-11 11:29 ` [PATCH 0/4] Fixes for x86 Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320874797-14270-5-git-send-email-lucas.demarchi@profusion.mobi \
--to=lucas.demarchi@profusion.mobi \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox