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

Ian Lance Taylor ian@zembu.com
Sat Jul 8 22:09:00 GMT 2000


   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


More information about the Binutils mailing list