This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld -Ttext 0x80000 causes ld.so segfault on ppc-unknown-linux-gnu


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]