g77 pic case vs. binutils & readelf

Robert Lipe robertl@sco.com
Fri Jun 4 08:49:00 GMT 1999


I haven't tracked down where things are going wrong but this is an
interesting clue I wanted to throw out before I left this problem for 
a little while.

Sometime in mid-april several of the -fPIC g77 testcases started
aborting on OpenServer.  Last night, I found that it was the dynamic
linker that was dropping core. [ Details in that message. ] I just
fed one of the offending binaries to 'readelf -a' from the binutils
snapshots.  Since binutils is dropping core when reading the binary, I
assume the binary (for whatever reason) is malformed.

(gdb) 
Continuing.
  0805586c  02b06 R_386_GLOB_DAT        08048ab4  ungetc                   
  00000000  00000 R_386_NONE           

Breakpoint 2, dump_relocations (file=0x452b28, rel_offset=40, rel_size=4, 
    symtab=0x806ca38, strtab=0x806c6c0 "", is_rela=0)
    at /play/binutils/binutils/readelf.c:577
577               psym = symtab + symtab_index;
(gdb) s
579               printf (" %08lx  ", (unsigned long) psym->st_value);
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
dump_relocations (file=0x452b28, rel_offset=134946024, rel_size=4, 
    symtab=0x806ca38, strtab=0x806c6c0 "", is_rela=0)
    at /play/binutils/binutils/readelf.c:579
579               printf (" %08lx  ", (unsigned long) psym->st_value);


I'll try to dig more into it this weekend.

RJL


More information about the Gcc mailing list