[PATCH] Fix segfault relocating debugging sections on powerpc-*-linux-gnu

Daniel Jacobowitz drow@false.org
Thu Jul 29 16:52:00 GMT 1999


When the attached testcase is compiled on powerpc-linux with 'c++ -fPIC
-shared -g segvtest.cc' it causes a SEGV in the linker.  Franz Sirl
noticed that elf32-i386.c specifically avoids relocations in sections
with SEC_DEBUGGING set; this patch adds the same to elf32-ppc.c.  It
also copies the warning from elf32-i386.c in the same situation; the if
condition here (here being elf32-ppc.c:3000 or so) does not obviously
guarantee that output_section will not be NULL, and there could be
other cases it misses.  I see no reason to have ld segfault
mysteriously :)

I would have added a testcase, but the organization of ld/testsuite/
eludes me.

[Please CC: me in any list replies, I'm not on this list]

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/


More information about the Binutils mailing list