bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/23980] New: powerpc64 ld segfault when linking libc on FreeBSD


From: alfredo.junior at eldorado dot org.br
Subject: [Bug ld/23980] New: powerpc64 ld segfault when linking libc on FreeBSD
Date: Thu, 13 Dec 2018 12:30:25 +0000

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

            Bug ID: 23980
           Summary: powerpc64 ld segfault when linking libc on FreeBSD
           Product: binutils
           Version: 2.32 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: alfredo.junior at eldorado dot org.br
  Target Milestone: ---

ld (BFD) crash with Segmentation Fault when cross compiling FreeBSD libc on
PowerPC64. The stack trace is:

Core was generated by `/usr/local/ld/usr/local/bin/ld
--sysroot=/usr/obj/usr/src/powerpc.powerpc64/tmp'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000bf4fe7 in _bfd_elf_link_hash_hide_symbol (info=0x119d208
<link_info>, h=0xffffffffffffffff, force_local=1) at elflink.c:7522
7522      if (h->type != STT_GNU_IFUNC)
(gdb) bt
#0  0x0000000000bf4fe7 in _bfd_elf_link_hash_hide_symbol (info=0x119d208
<link_info>, h=0xffffffffffffffff, force_local=1) at elflink.c:7522
#1  0x0000000000d5a1f8 in ppc64_elf_hide_symbol (info=0x119d208 <link_info>,
h=0x804bd64e0, force_local=1) at elf64-ppc.c:6243
#2  0x0000000000bece39 in elf_link_add_object_symbols (abfd=0x8047d7a80,
info=0x119d208 <link_info>) at elflink.c:5020
#3  0x0000000000be9b21 in bfd_elf_link_add_symbols (abfd=0x8047d7a80,
info=0x119d208 <link_info>) at elflink.c:5741
#4  0x0000000000620145 in load_symbols (entry=0x801c0c990,
place=0x7fffffff6270) at ldlang.c:3079
#5  0x0000000000624584 in open_input_bfds (s=0x801c0c990, mode=OPEN_BFD_NORMAL)
at ldlang.c:3528
#6  0x00000000006236dc in lang_process () at ldlang.c:7382
#7  0x0000000000630879 in main (argc=1301, argv=0x7fffffff6518) at
./ldmain.c:440

On stack frame #1 (elf64-ppc.c:6243), second parameter &fh->elf seems to be
invalid/unset (-1)


(gdb) frame 1
#1  0x0000000000d5a1f8 in ppc64_elf_hide_symbol (info=0x119d208 <link_info>,
h=0x804bd64e0, force_local=1) at elf64-ppc.c:6243
6243            _bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
(gdb) p/x &fh
$2 = 0x7fffffff5b48
(gdb) p/x &fh->elf
$3 = 0xffffffffffffffff



(gdb) p *(struct ppc_link_hash_entry *)&fh
$12 = {elf = {root = {root = {next = 0xffffffffffffffff, string = 0x804bd64e0
"", hash = 4325052448}, type = 224, non_ir_ref_regular = 0, non_ir_ref_dynamic
= 0, linker_def = 1, 
      ldscript_def = 0, rel_from_abs = 0, u = {undef = {next = 0x119d208
<link_info>, abfd = 0x7fffffff6180}, def = {next = 0x119d208 <link_info>,
section = 0x7fffffff6180, 
          value = 12504633}, i = {next = 0x119d208 <link_info>, link =
0x7fffffff6180, warning = 0xbece39 <elf_link_add_object_symbols+13017>
"\307\205\250\374\377\377"}, c = {
          next = 0x119d208 <link_info>, p = 0x7fffffff6180, size = 12504633}}},
indx = 0, dynindx = 140733193388032, got = {refcount = 140733193388032, offset
= 140733193388032, 
      glist = 0x7fff00000000, plist = 0x7fff00000000}, plt = {refcount =
34439765800, offset = 34439765800, glist = 0x804c51f28, plist = 0x804c51f28},
size = 140737488313968, type = 184, 
    other = 94, target_internal = 255, ref_regular = 1, def_regular = 1,
ref_dynamic = 1, def_dynamic = 1, ref_regular_nonweak = 1, dynamic_adjusted =
1, needs_copy = 1, needs_plt = 1, 
    non_elf = 1, versioned = versioned_hidden, forced_local = 1, dynamic = 1,
mark = 1, non_got_ref = 1, dynamic_def = 1, ref_dynamic_nonweak = 1,
pointer_equality_needed = 1, 
    unique_global = 1, protected_def = 1, start_stop = 1, is_weakalias = 1,
dynstr_index = 140737488314052, u = {alias = 0x7fffffff5ec8, elf_hash_value =
140737488314056}, verinfo = {
      verdef = 0x7fffffff5e9c, vertree = 0x7fffffff5e9c}, u2 =
{start_stop_section = 0x80128dd7f, vtable = 0x80128dd7f}}, u = {stub_cache =
0x801606228, next_dot_sym = 0x801606228}, 
  dyn_relocs = 0x87, oh = 0x7000, is_func = 0, is_func_descriptor = 0, fake =
0, adjust_done = 0, save_res = 0, non_zero_localentry = 0, tls_mask = 0 '\000'}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]