https://sourceware.org/bugzilla/show_bug.cgi?id=19073
Bug ID: 19073 Summary: ld: Segmentation fault building Glibc Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: krebbel at linux dot vnet.ibm.com Target Milestone: --- Binutils cannot be used to build Glibc since this commit: commit 422f11824b3abf6c71042e2ee3aed572f250fc89 Author: H.J. Lu <hjl.to...@gmail.com> Date: Mon Aug 10 07:57:40 2015 -0700 Replace hidden with versioned in elf_link_hash_entry This patch replaces the "hidden" field with the "versioned" field in elf_link_hash_entry so that we can avoid calling strchr and strrchr if the symbol is unversioned. * elf-bfd.h (elf_symbol_version): New enum. (elf_link_hash_entry): Replace hidden with versioned. * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol version if the symbol is unversioned. Initialize versioned. (_bfd_elf_add_default_symbol): Don't look for symbol version if the symbol is unversioned or hidden. Initialize versioned. (elf_collect_hash_codes): Don't look for symbol version if the symbol is unversioned. (elf_collect_gnu_hash_codes): Likewise. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise. (_bfd_elf_link_hash_copy_indirect): Check versioned instead of hidden. (elf_link_output_extsym): Likewise. gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld64.so.1 -B/home/andreas/glibc/glibc-06102015-build/csu/ -Wl,--version-script=/home/andreas/glibc/glibc-06102015-build/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -nostdlib -nostartfiles -e __libc_main -L/home/andreas/glibc/glibc-06102015-build -L/home/andreas/glibc/glibc-06102015-build/math -L/home/andreas/glibc/glibc-06102015-build/elf -L/home/andreas/glibc/glibc-06102015-build/dlfcn -L/home/andreas/glibc/glibc-06102015-build/nss -L/home/andreas/glibc/glibc-06102015-build/nis -L/home/andreas/glibc/glibc-06102015-build/rt -L/home/andreas/glibc/glibc-06102015-build/resolv -L/home/andreas/glibc/glibc-06102015-build/crypt -L/home/andreas/glibc/glibc-06102015-build/mathvec -L/home/andreas/glibc/glibc-06102015-build/nptl -Wl,-rpath-link=/home/andreas/glibc/glibc-06102015-build:/home/andreas/glibc/glibc-06102015-build/math:/home/andreas/glibc/glibc-06102015-build/elf:/home/andreas/glibc/glibc-06102015-build/dlfcn:/home/andreas/glibc/glibc-06102015-build/nss:/home/andreas/glibc/glibc-06102015-build/nis:/home/andreas/glibc/glibc-06102015-build/rt:/home/andreas/glibc/glibc-06102015-build/resolv:/home/andreas/glibc/glibc-06102015-build/crypt:/home/andreas/glibc/glibc-06102015-build/mathvec:/home/andreas/glibc/glibc-06102015-build/nptl -o /home/andreas/glibc/glibc-06102015-build/libc.so -T /home/andreas/glibc/glibc-06102015-build/shlib.lds /home/andreas/glibc/glibc-06102015-build/csu/abi-note.o /home/andreas/glibc/glibc-06102015-build/elf/soinit.os /home/andreas/glibc/glibc-06102015-build/libc_pic.os /home/andreas/glibc/glibc-06102015-build/elf/sofini.os /home/andreas/glibc/glibc-06102015-build/elf/interp.os /home/andreas/glibc/glibc-06102015-build/elf/ld.so -lgcc /bin/sh ../scripts/rellns-sh /home/andreas/glibc/glibc-06102015-build/elf/ld.so /home/andreas/glibc/glibc-06102015-build/elf/ld64.so.1.new mv -f /home/andreas/glibc/glibc-06102015-build/elf/ld64.so.1.new /home/andreas/glibc/glibc-06102015-build/elf/ld64.so.1 collect2: error: ld terminated with signal 11 [Segmentation fault] make[2]: *** [/home/andreas/glibc/glibc-06102015-build/libc.so] Error 1 make[2]: Leaving directory `/home/andreas/glibc/glibc/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/home/andreas/glibc/glibc' make: *** [all] Error 2 Program received signal SIGSEGV, Segmentation fault. 0x000003fffdeb323c in __memcpy_mvcle () from /lib64/libc.so.6 (gdb) bt #0 0x000003fffdeb323c in __memcpy_mvcle () from /lib64/libc.so.6 #1 0x000000008009ae06 in _bfd_elf_add_default_symbol (abfd=0x8022f050, info=0x801be990 <link_info>, h=0x802b02f8, name=0x8024bab7 "setjmp", sym=0x3fff78d22d0, sec=0x80230320, value=86064, poldbfd=0x3ffffffddd0, dynsym=0x3ffffffddc0) at /home/andreas/binutils/binutils/bfd/elflink.c:1724 #2 0x00000000800a1752 in elf_link_add_object_symbols (abfd=0x8022f050, info=0x801be990 <link_info>) at /home/andreas/binutils/binutils/bfd/elflink.c:4375 #3 0x00000000800a3918 in bfd_elf_link_add_symbols (abfd=0x8022f050, info=0x801be990 <link_info>) at /home/andreas/binutils/binutils/bfd/elflink.c:5241 #4 0x0000000080015580 in load_symbols (entry=0x801c0328, place=0x3ffffffe438) at /home/andreas/binutils/binutils/ld/ldlang.c:2854 #5 0x0000000080016790 in open_input_bfds (s=0x801c0328, mode=OPEN_BFD_NORMAL) at /home/andreas/binutils/binutils/ld/ldlang.c:3311 #6 0x000000008001ebe4 in lang_process () at /home/andreas/binutils/binutils/ld/ldlang.c:6677 #7 0x0000000080024c06 in main (argc=50, argv=0x3ffffffe898) at /home/andreas/binutils/binutils/ld/ldmain.c:419 -- 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