This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Add -z text-start-addr=ADDR to ELF linker
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 12 Jan 2009 22:21:52 -0800
- Subject: Re: RFC: Add -z text-start-addr=ADDR to ELF linker
- References: <20090112192946.GA26659@lucon.org> <m3ljtfg3y3.fsf@google.com>
On Mon, Jan 12, 2009 at 09:39:16PM -0800, Ian Lance Taylor wrote:
> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>
> > Sometimes, we want to load the ELF executable in a different address from
> > the default. This patch adds -z text-start-addr=ADDR to ELF linker. If it
> > is acceptable, I will submit a complete patch with some testcases.
>
> We already support -Ttext=ADDR and SEGMENT_START. Does this add
> anything to that approach?
>
Do they cover ELF headers? There is
PROVIDE (__executable_start = 0x400000); . = 0x400000 + SIZEOF_HEADERS;
x86 supports 2MB maximum page size. If you change text section
address, you leave a big gap in output.
H.J.