This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: x86-64: LD default ELF section file offset == LMA ?
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, binutils at sourceware dot org
- Date: Fri, 3 Apr 2009 16:39:42 +0000 (GMT)
- Subject: Re: x86-64: LD default ELF section file offset == LMA ?
- Reply-to: etienne_lorrain at yahoo dot fr
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.