[llvm-bugs] [Bug 48282] New: --cref on ld.lld writes the cref table to stdout even with -Map=filename

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 24 06:00:29 PST 2020


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

            Bug ID: 48282
           Summary: --cref on ld.lld writes the cref table to stdout even
                    with -Map=filename
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: janm at transactionware.com
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

Created attachment 24204
  --> https://bugs.llvm.org/attachment.cgi?id=24204&action=edit
Patch to use the file from -Map as a target for --cref output.

The --cref option on ld.lld only seems to write to stdout, ignoring the
-Map=filename option. This is a change from GNU ld.

To reproduce, compile and link any code with --cref, for example:

    echo 'int main() { return 0; }' > test.c
    cc -Wl,-Map=test.map -Wl,--cref test.c

The cross reference table is emitted on stdout instead of being written to
test.map.

A patch (against the lld imported into the FreeBSD 12.2 tree) that resolves the
issue for me is attached.

-- 
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/20201124/042a6b5b/attachment.html>


More information about the llvm-bugs mailing list