https://sourceware.org/bugzilla/show_bug.cgi?id=33018
Bug ID: 33018 Summary: Segmentation Fault in ld-new due to Unsupported Relocation Type Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: xdcao.cs at gmail dot com Target Milestone: --- Summary Segmentation Fault in ld-new due to Unsupported Relocation Type Environment GNU Binutils version: 2.44.50 & master OS: Ubuntu 22.04.5 LTS Steps to reproduce # export CFLAGS="-g -O0 -fno-inline -fno-lto -fsanitize=address" # export CXXFLAGS="-g -O0 -fno-inline -fno-lto -fsanitize=address" # ./configure --disable-werror --enable-targets=all --enable-gold[=yes] # make -j64 & make install root@c6c01f72391e:# ./ld-new --gc-sections POC ./ld-new: POC: unsupported relocation type 0x82 AddressSanitizer:DEADLYSIGNAL ================================================================= ==848100==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x000000c8bfbd bp 0x7fff2e2473a0 sp 0x7fff2e2470f0 T0) ==848100==The signal is caused by a READ memory access. ==848100==Hint: address points to the zero page. #0 0xc8bfbd in bfd_get_reloc_size /workspace/new-test/program/binutils-gdb/bfd/./bfd.h:3224:17 #1 0xc8748b in elf_x86_64_scan_relocs /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:2555:27 #2 0xd4d733 in _bfd_elf_link_iterate_on_relocs /workspace/new-test/program/binutils-gdb/bfd/elflink.c:4282:9 #3 0xc6d57c in elf_x86_64_early_size_sections /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:3099:6 #4 0xd61507 in bfd_elf_size_dynamic_sections /workspace/new-test/program/binutils-gdb/bfd/elflink.c:6916:11 #5 0xbc167c in ldelf_before_allocation /workspace/new-test/program/binutils-gdb/ld/ldelf.c:1840:10 #6 0x50aa2a in lang_process /workspace/new-test/program/binutils-gdb/ld/ldlang.c:8623:3 #7 0x53aee3 in main /workspace/new-test/program/binutils-gdb/ld/./ldmain.c:882:3 #8 0x7f82b2d34d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #9 0x7f82b2d34e3f in __libc_start_main csu/../csu/libc-start.c:392:3 #10 0x4206f4 in _start (/workspace/new-test/fuzzdir/fz-ld/ld-new+0x4206f4) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /workspace/new-test/program/binutils-gdb/bfd/./bfd.h:3224:17 in bfd_get_reloc_size ==848100==ABORTING POC https://drive.google.com/file/d/14RVWK8gBGrLzMlev8t2fDXsIZokosak1/view?usp=sharing redit Xiaoguo Li (CUPL) Xudong Cao (UCAS) -- You are receiving this mail because: You are on the CC list for the bug.