https://sourceware.org/bugzilla/show_bug.cgi?id=23189

            Bug ID: 23189
           Summary: bad symbol index: ffffffff
           Product: binutils
           Version: 2.30
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: pangbw at gmail dot com
  Target Milestone: ---

Created attachment 11020
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11020&action=edit
the linker script

I am seeing bad relocation is created for hidden symbols with ld 2.30, there is
no problem with 2.29 with the same test case and the same procedure:

$ cat t.c
extern int *__hidden_sym;
int *foo()
{
  return __hidden_sym;
}

$ gcc -c -fpic t.c -o t.sho
ld -m elf_x86_64 -shared -o libt.so t.sho -Tx.link

$ readelf -r libt.so

Relocation section '.rela.dyn' at offset 0x1e0 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000200320  ffffffff00000006 R_X86_64_GLOB_DAT bad symbol index: ffffffff

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to