https://sourceware.org/bugzilla/show_bug.cgi?id=28098
Bug ID: 28098 Summary: Linking with with libcudart_static.a produces an empty eh_frame_hdr section Product: binutils Version: 2.38 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: michael.krasnyk at gmail dot com CC: ian at airs dot com Target Milestone: --- Hi, linking with with libcudart_static.a produces an empty eh_frame_hdr section. Steps to reproduce: curl -s https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-cudart-dev-11-2_11.2.152-1_amd64.deb | dpkg --fsys-tarfile - | tar xOf - ./usr/local/cuda-11.2/targets/x86_64-linux/lib/libcudart_static.a > libcudart_static.a sha256sum libcudart_static.a 3ca014141258ae33abb175aa88a8282507a04d8a16d8f8dc9340e7831c5831e6 libcudart_static.a cat > main.c <<EOF void cudaMalloc(); void main() { cudaMalloc(); } EOF gcc main.c -fuse-ld=gold libcudart_static.a -ldl -lrt -pthread && readelf -WS ./a.out | grep eh_frame_hdr [17] .eh_frame_hdr X86_64_UNWIND 00000000000979a4 0979a4 000008 00 A 0 0 4 The section is 011b ffff 9889 fdff and bytes 2 and 3 are set to elfcpp::DW_EH_PE_omit. The flag any_unrecognized_eh_frame_sections_ is set due to the true condition at line https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l665 Please could some one point if it is an issue in the static lib, a missing feature in gold linker, or incorrect behavior? ld.gold --version GNU gold (GNU Binutils 2.36.50.20210628) 1.16 git SHA 05b857720611bc2e1f9cca2573085b774181af9d Regards, Michael Krasnyk -- You are receiving this mail because: You are on the CC list for the bug.