https://sourceware.org/bugzilla/show_bug.cgi?id=22300
Alan Modra <amodra at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|amodra at gmail dot com | Assignee|unassigned at sourceware dot org |amodra at gmail dot com --- Comment #4 from Alan Modra <amodra at gmail dot com> --- p *hh $6 = {eh = {root = {root = {next = 0x288fa0, string = 0x14ede2 "PolyThreadForkThread", hash = 155903331}, type = bfd_link_hash_defined, non_ir_ref_regular = 0, non_ir_ref_dynamic = 0, linker_def = 0, ldscript_def = 0, u = { undef = {next = 0x12fb18, abfd = 0x1581f8}, def = {next = 0x12fb18, section = 0x1581f8, value = 225876}, i = { next = 0x12fb18, link = 0x1581f8, warning = 0x37254 <gldhppalinux_search_needed+532> "\b\003\002Z\350X\n\255\b\006\002C\350X\n\235\b\021\002Z4\031"}, c = { next = 0x12fb18, p = 0x1581f8, size = 225876}}}, indx = -1, dynindx = 39, got = {refcount = -1, offset = 4294967295, glist = 0xffffffff, plist = 0xffffffff}, plt = {refcount = -1, offset = 4294967295, glist = 0xffffffff, plist = 0xffffffff}, size = 604, type = 2, other = 0, target_internal = 0, ref_regular = 1, def_regular = 0, ref_dynamic = 0, def_dynamic = 1, ref_regular_nonweak = 1, dynamic_adjusted = 1, needs_copy = 0, needs_plt = 0, non_elf = 1, versioned = unversioned, forced_local = 0, dynamic = 0, mark = 0, non_got_ref = 0, dynamic_def = 1, ref_dynamic_nonweak = 0, pointer_equality_needed = 0, unique_global = 0, protected_def = 0, start_stop = 0, dynstr_index = 1527, u = { weakdef = 0xde9f7f4, elf_hash_value = 233437172}, verinfo = {verdef = 0x0, vertree = 0x0}, u2 = {start_stop_section = 0x0, vtable = 0x0}}, hsh_cache = 0x0, dyn_relocs = 0x0, tls_type = GOT_UNKNOWN, plabel = 0} Huh, non_elf set? So that comes about due to _bfd_elf_merge_symbol not getting to elflink.c:1212 where non_elf is cleared. And if we don't get there then none of the proper merging of elf symbols occurs. And that's because _bfd_elf_merge_symbol exits here: if (!(*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec)) return TRUE; The output bfd vec is hppa_elf32_linux_vec while the input (polyexport.o) is hppa_elf32_vec, and elf32-hppa.c has no define for elf_backend_relocs_compatible so uses the default that requires an exact match of bfd vec. polyexport.o is hppa_elf32_vec because os/abi is ELFOSABI_HPUX. The output is hppa_elf32_linux_vec because that's the default target. bug 1: polyimport, the producer of polyexport.o is using the wrong os/abi for hppa-linux. bug 2: elf32-hppa.c ought to be using _bfd_elf_relocs_compatible bug 3: _bfd_elf_merge_symbol shouldn't be using relocs_compatible -- 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