x86-64: LD default ELF section file offset == LMA ?
Etienne Lorrain
etienne_lorrain@yahoo.fr
Fri Apr 3 16:39:00 GMT 2009
H.J. wrote:
> If you tell us what you are trying to do, we may be able to help you.
Well, I was just trying to generate a very simple ELF64 file as an
example of what the Gujin bootloader can load from power-on.
It would also be a Gujin regression test, i.e. check that I load
each of the segment at their right address. Gujin do not switch
to 64 bits mode, but can still understand ELF64.
Unlike for ELF32, it seems that I cannot use the standard linker
command file to generate a valid ELF64 - i.e. something not loaded
at physical address 0 but just after the real mode address space
at 0x110000. The physical load address should be lower than the
amount of RAM a standard PC has.
So either I need another file for the ELF64 linker, or I build
a relocatable ELF64, Gujin was able to relocate but I did not test
that for some time.
Etienne.
More information about the Binutils
mailing list