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: alan at linuxcare dot com dot au
- Subject: Re: ld -Ttext 0x80000 causes ld.so segfault on ppc-unknown-linux-gnu
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 8 Jul 2000 22:08:56 -0700
- CC: anton at mips dot complang dot tuwien dot ac dot at, binutils at sourceware dot cygnus dot com
- References: <Pine.LNX.4.21.0007082250450.19446-100000@front.linuxcare.com.au>
Date: Sat, 8 Jul 2000 23:33:08 +1000 (EST)
From: Alan Modra <alan@linuxcare.com.au>
cc: binutils@sourceware.cygnus.com
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.
There are a number of problems that need fixing before -Ttext=addr will
work as you might expect.
-Ttext is documented to set the start of the .text section. It's not
very useful for ELF. For ELF, we might want to invent a new option,
which somehow sets the address of the entire text segment.
Ian