https://sourceware.org/bugzilla/show_bug.cgi?id=22994
Bug ID: 22994 Summary: GOLD drops STV_PROTECTED status from weak function symbols Product: binutils Version: 2.31 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: nickc at redhat dot com CC: ian at airs dot com Target Milestone: --- Target: x86_64 Created attachment 10909 --> https://sourceware.org/bugzilla/attachment.cgi?id=10909&action=edit Object files and shell script to demonstrate the bug When gold is used to link the LLVM IR files in the uploaded test it drops the STV_PROTECTED status from the f1 function symbol. Earlier versions of gold (2.29 or previous) did not do this. Nor does the 2.30 bfd linker. To reproduce install llvm and then run the build.sh script. Using ld.bfd in the script produces: 16: 0000000000001000 6 FUNC WEAK PROTECTED 6 f1 8: 0000000000003f10 0 SECTION LOCAL DEFAULT 8 11: 0000000000001010 2 FUNC LOCAL DEFAULT 6 f1.2 14: 0000000000003f10 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC 26: 0000000000001000 6 FUNC WEAK PROTECTED 6 f1 whereas ld.gold produces: 18: 00000000000005b0 6 FUNC WEAK DEFAULT 8 f1 2: 00000000000005c0 2 FUNC LOCAL DEFAULT 8 f1.2 24: 00000000000005b0 6 FUNC WEAK DEFAULT 8 f1 -- 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