http://sourceware.org/bugzilla/show_bug.cgi?id=12366

           Summary: assertion failure with STT_GNU_IFUNC symbols on x86_64
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassig...@sources.redhat.com
        ReportedBy: richard.sandif...@linaro.org


Created attachment 5181
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5181
Shell script to reproduce bug

The x86 and x86_64 IFUNC code assumes that check_relocs can rely on def_regular
being set for all regular definitions.  That's not true, because def_regular is
set by the same pass that calls check_relocs, and doesn't therefore take into
account regular definitions in later objects.  Everything works if the regular
definition comes before the regular use, but not the other way round.

I've attached a simple example.  The link order in the example gives:

./ld/ld-new: BFD (GNU Binutils) 2.21.51.20110105 internal error, aborting at
/usr/export/richards-desktop-2/richards/binutils/HEAD/src/bfd/elf64-x86-64.c
line 2802 in elf_x86_64_relocate_section

./ld/ld-new: Please report this bug.

But linking bar.o before foo.o works as expected.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to