current HEAD (20060315) produces an unusable elilo.efi executable (elilo-3.6) objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-ia32 elilo.so elilo.efi Before the patch in PR/1487, that gave a binary that ran. Afterwards, it gives a binary that fails to run. Binaries are available at http://www.codon.org.uk/~mjg59/tmp/efi/
Please provide a working elilo.so.
Please also tell me which version of binutils works.
I couldn't even get simple EFI applications in gnu-efi 3.0a to work on IA32 with various versions of gcc and binutils.
I can use gcc 2.96 from RH 7.3 and the Linux binutils 2.13.90.0.4 to generate working EFI applications.
gnu-efi 3.0a is incompatible with gcc 4, to the best of my knowledge. Using gcc-4.0 with -march=i386 and binutils before 2005-10-23 I can build working elilo binaries. After that date (to be precise, the patch to fix PR/1487) I can't. I'll try to get an elilo.so from a working build and attach it.
I don't need elilo.so since I can generate working EFI applications. We have 2 problems here, gcc and binutils. Which gcc can be used for gnu-efi? I know gcc 2.96 works and gcc 3.2 doesn't work. How about gcc 3.4 and gcc 4.1?
gcc-4.0.3 appears to work with gnu-efi 3.0b. I'm using the tarball and diff from http://ftp.uk.debian.org/debian/pool/main/g/gnu-efi/ .
What was the date of last working binutils, which I can use to check out from binutils CVS mainline with # cvs co -D "xxxxx"
2005-10-24 is broken, but narrowing it down further (based on the times) the patch you committed for that (dated the 23rd, but appeared on the 24th judging by CVS timstamps) is the turning point - before that, I get working binaries, and afterwards I get broken ones.
Do you have a list of known working/non-working gcc versions?
Every gcc version I've tested works, providing I use -march=i386.
I tried -march=i386 with gcc version 4.0.3 20060213 and gcc version 3.4.6 20060301 using binutils 2.16.91 20051023. I couldn't get a working EFI application.
Which version of gnu-efi are you using?
gnu-efi 3.0b works with gcc 3.4, 4.0 and 4.1.
Sorry, I'm not entirely clear on that - you're using gnu-efi 3.0b? I had to build that with -march=i386 as well, but once I had done had no problem in building elilo with older binutils (regardless of gcc version). 486 instructions appear to make some EFI implementations unhappy.
Created attachment 927 [details] A patch for gnu-efi 3.0b The bug is in the linker scripts in gnu-efi 3.0b. With this patch, there is no need to use -march=i386. The current binutils and gcc should work correctly for both ia32 and i64.
Created attachment 928 [details] A patch for elilo 3.6 The comments in elilo 3.6 about gcc versions for ia32 are misleading. This patch removes them.
The problem is in gnu-efi 3.0b, not binutils.
Hmm. I still appear to need -march=i386, but other than that can build successfully. Thanks!
Which gcc are you using? -march=i386 shouldn't be needed.
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu1) It defaults to targetting i486.
Created attachment 929 [details] An updated patch for gnu-efi 3.0b This new patch should work for gcc 4.0.3.
Created attachment 930 [details] A modified patch for gnu-efi 3.0b This patch makes linker script similar to normal linker.
That appears to be perfect. Thanks!