[llvm-bugs] [Bug 36653] New: error during fuzzer linking: .text.sancov.module_ctor referenced in section defined in discarded section

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 8 12:13:30 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36653

            Bug ID: 36653
           Summary: error during fuzzer linking: .text.sancov.module_ctor
                    referenced in section defined in discarded section
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: pdknsk at gmail.com
                CC: llvm-bugs at lists.llvm.org

$ clang -v
clang version 7.0.0 (trunk 327009) (llvm/trunk 327036)

I'm getting many of these, which causes linking to fail.

`.text.sancov.module_ctor.14' referenced in section
`.init_array.2[sancov.module_ctor.14]' of
./.libs/libexample_util.a(example_util.o): defined in discarded section
`.text.sancov.module_ctor.14[sancov.module_ctor]' of
./.libs/libexample_util.a(example_util.o)

Now this is on Ubuntu 14.04 LTS with fairly old binutils.

$ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.24

Updating to binutils of the latest LTS (16.04) doesn't work either, same error.

$ ld -v
GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11

Only an update to the latest version of the first non-LTS release (17.01) turns
the errors into warnings.

./.libs/libexample_util.a(example_util.o)(.init_array.2+0x0): warning:
relocation refers to discarded section

$ ld -v
GNU gold (GNU Binutils for Ubuntu 2.29.1) 1.14

I don't know what the policy is, but unless binutils isn't supported any more,
I think this classifies as a bug.

PS. lld works of course.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180308/4c7947b0/attachment.html>


More information about the llvm-bugs mailing list