From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: binutils@sourceware.cygnus.com Subject: [PATCH] Fix segfault relocating debugging sections on powerpc-*-linux-gnu Date: Thu, 29 Jul 1999 16:52:00 -0000 Message-id: <19990729195420.A20264@them.org> X-SW-Source: 1999-07/msg00042.html 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 | \--------------------------------/ \--------------------------------/