This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Don't set TEXT_START_ADDR for MIPS n64
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sourceware dot org, rdsandiford at googlemail dot com
- Cc: Eric Christopher <echristo at apple dot com>, Thiemo Seufer <ths at networkno dot de>
- Date: Wed, 6 Aug 2008 16:38:48 -0400
- Subject: Re: [PATCH] Don't set TEXT_START_ADDR for MIPS n64
- References: <873amxzdkr.fsf@firetop.home>
I believe this is the only one of Richard's original series which is
still pending.
On Sat, Jun 28, 2008 at 06:14:44PM +0100, Richard Sandiford wrote:
> In:
>
> http://sourceware.org/ml/binutils/2003-05/msg00636.html
>
> Maciej increased the n64 TEXT_START_ADDR beyond the 2GB limit:
>
> Setting text segment's start address above 4 GB for 64-bit
> executables aids in finding unportable software -- if a pointer
> is cropped to 32 bits, instead of a possible memory corruption a
> segmentation fault is sent as nothing is mapped below text normally.
>
> That's certainly a useful thing to want to test. However,
> as linux has proved, you can get big size savings using -msym32
> for n64 code. The n64 definition prevents -msym32 working by default.
>
> Of the two, I think allowing -msym32 is the better default choice.
> Anyone wanting to smoke out invalid assumptions could still use
> -Ttext to do so.
>
> Tested on mips64-linux-gnu and mips64el-linux-gnu. OK to install?
>
> Richard
>
>
> ld/
> * emulparams/elf64btsmip.sh (TEXT_START_ADDR): Delete.
>
> ld/testsuite/
> * ld-mips-elf/elf-rel-got-n64-linux.d: Adjust start address from
> 0x120000000 to 0x10000000.
> * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
I consider this patch reasonable; Maciej objected, but I'm not sure I
entirely understand the problem. Maciej, do you want to explain?
Eric or Thiemo, do you have opinions?
--
Daniel Jacobowitz
CodeSourcery