[llvm-bugs] [Bug 50791] New: lld/mac mislinks binaries (protoc, chromium, ...) on arm with --deduplicate-literals

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 21 18:55:05 PDT 2021


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

            Bug ID: 50791
           Summary: lld/mac mislinks binaries (protoc, chromium, ...) on
                    arm with --deduplicate-literals
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

Repro:
https://drive.google.com/file/d/1RJe4CRLk3_ULWolz4xZApy6XIJvxMl1R/view?usp=sharing

Link using the response file, then run like so:

./protoc csd.proto --cpp_out .          

Then look at csd.pb.h in the output. Line 45 will say

  static const ::r_PROTO_NAMESPACE_ID::internal::ParseTableField entries[]

There's a \0 character in the middle of the line, and the line's all wrong.

Remove --deduplicate-literals from that line, link again, and that line looks
like

  static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]

like it's supposed to do.

-- 
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/20210622/c818220c/attachment.html>


More information about the llvm-bugs mailing list