[Bug gold/28098] New: Linking with with libcudart_static.a produces an empty eh_frame_hdr section
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 <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.
[Bug gold/28098] Linking with with libcudart_static.a produces an empty eh_frame_hdr section
https://sourceware.org/bugzilla/show_bug.cgi?id=28098 --- Comment #1 from Michael Krasnyk --- Created attachment 13559 --> https://sourceware.org/bugzilla/attachment.cgi?id=13559&action=edit add filtering of R_X86_64_NONE entries Relocation section '.rela.eh_frame' has an R_X86_64_NONE entry 00013200 000a0002 R_X86_64_PC32 .text + 5ae80 00013238 R_X86_64_NONE 0 00013258 001e0002 R_X86_64_PC32 .text._ZN15CUOSdlsymLoaderIPFimPKcEED2Ev + 0 Please consider the patch that adds filtering R_X86_64_NONE entries in Track_relocs::advance -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gold/28098] Linking with with libcudart_static.a produces an empty eh_frame_hdr section
https://sourceware.org/bugzilla/show_bug.cgi?id=28098 --- Comment #3 from Michael Krasnyk --- Thanks for your comments, Alan! I have sent the updated patch to the mailing list. To duplicate here from the email: Result values of Reloc::advance are used at five places https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l665 https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l688 https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l889 https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l922 https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l1018 for early termination of do_add_ehframe_input_section and at one place https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/ehframe.cc;h=8a19b21055924ae17c40f9f7c2ac4e421bf58392;hb=HEAD#l919 in an assertion, so this change should not change behavior but prevent earlier termination if the relocation section has an entry with r_info = 0. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gold/28098] Linking with with libcudart_static.a produces an empty eh_frame_hdr section
https://sourceware.org/bugzilla/show_bug.cgi?id=28098 --- Comment #4 from Michael Krasnyk --- Created attachment 13561 --> https://sourceware.org/bugzilla/attachment.cgi?id=13561&action=edit updated patch -- You are receiving this mail because: You are on the CC list for the bug.