This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld -Ttext 0x80000 causes ld.so segfault on ppc-unknown-linux-gnu
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: ld -Ttext 0x80000 causes ld.so segfault on ppc-unknown-linux-gnu
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sun, 9 Jul 2000 17:03:58 +1000 (EST)
- cc: anton at mips dot complang dot tuwien dot ac dot at, binutils at sourceware dot cygnus dot com
On 8 Jul 2000, Ian Lance Taylor wrote:
> I started playing with this a little and discoverd a silly bug in the
> "--section-start SECTION=ADDR", fixed with the patch later in this
> email.
>
> I don't see why this patch is needed. getopt will set optarg to point
> to argv. argv will not change until the program returns from main.
> Of course, it doesn't do any harm.
The old code played tricks like this:
optarg2[-1] = '\0';
/* Then set it... */
set_section_start (optarg, optarg2);
optarg2[-1] = '=';
set_section_start then set up the appropriate linker statements, but
there wasn't any copy of the name. We ended up with a
lang_address_statement with section_name pointing to something like
".init=0x80000".
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.