diff options
author | Michael Brown | 2013-09-25 13:55:46 +0200 |
---|---|---|
committer | Michael Brown | 2013-09-25 13:55:46 +0200 |
commit | cba22d36b77da53890bd65fdadd0e63925687af0 (patch) | |
tree | 340339fb8c8ccebd66638abb22a7b2d6db751bb5 /src/arch/i386/image/elfboot.c | |
parent | [ipv6] Add inet6_aton() (diff) | |
download | ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.tar.gz ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.tar.xz ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.zip |
[build] Work around bug in gcc >= 4.8
Commit 238050d ("[build] Work around bug in gcc >= 4.8") works around
one instance of a bug in recent versions of gcc, in which "ebp" cannot
be specified within an asm clobber list.
Some versions of gcc seem to exhibit the same bug on other points in
the codebase. Fix by changing all instances of "ebp" in a clobber
list to use the push/pop %ebp workaround instead.
Originally-implemented-by: Víctor Román Archidona <contacto@victor-roman.es>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/image/elfboot.c')
-rw-r--r-- | src/arch/i386/image/elfboot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/i386/image/elfboot.c b/src/arch/i386/image/elfboot.c index a867a956..0f6957f0 100644 --- a/src/arch/i386/image/elfboot.c +++ b/src/arch/i386/image/elfboot.c @@ -60,10 +60,11 @@ static int elfboot_exec ( struct image *image ) { /* Jump to OS with flat physical addressing */ DBGC ( image, "ELF %p starting execution at %lx\n", image, entry ); - __asm__ __volatile__ ( PHYS_CODE ( "call *%%edi\n\t" ) + __asm__ __volatile__ ( PHYS_CODE ( "pushl %%ebp\n\t" /* gcc bug */ + "call *%%edi\n\t" + "popl %%ebp\n\t" /* gcc bug */ ) : : "D" ( entry ) - : "eax", "ebx", "ecx", "edx", "esi", "ebp", - "memory" ); + : "eax", "ebx", "ecx", "edx", "esi", "memory" ); DBGC ( image, "ELF %p returned\n", image ); |