Segfaults in powerpc ld (binutils-2.9.1-19a)

harry eaton haceaton at aplcomm.jhuapl.edu
Sat Mar 6 06:04:50 EST 1999


I'm getting seg-faults in ld when I try to compile twin on a powerpc
linux system.  I'm using binutils-2.9.1-19a
and egcs-1.1-1c.

gcc is invoked with these arguments:


-Wall -fwritable-strings -fPIC -shared  -Wl,-Bsymbolic

What specifically is happening is this:
 on line 2856 of bfd/elf32-ppc.c (of binutls of course) the segfault
occurs.

rel->r_info is R_PPC_REL24
info->symbolic is true.
the name of the section:  h->root.u.def.section is ".text"
h->root.u.def.section->output_section is NULL !!!!

The NULL is the problem since it is de-referenced.

I added a test for this NULL, and just used a break
to stop the segfault.  That stops the segfault but
seems to just lose the symbol?  (Later stages of the
make complain about missing symbols during
linking.)  I also added some statements to print
when the this line is encountered and the output_section
is not 0.  I've compiled a few other things with it
configured this way, and the print is never triggered.
It seems like this particular relocation situation is
very seldom encountered, so the bug may have been
lurking for a while.

I have to admit that I don't know enough about the
linker to figure out what's going on.

the twin source consistently causes this problem,
but I have not been able to make  a small example.

Ideas?

harry




[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]




More information about the Linuxppc-dev mailing list