[llvm-bugs] [Bug 46793] New: Show filename for all script parse errors

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 21 10:18:47 PDT 2020


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

            Bug ID: 46793
           Summary: Show filename for all script parse errors
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: edd-llvm at mr-edd.co.uk
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

We had a problem with a bad build that was effectively writing nonsense in to
object files. As lld didn't recognise them as anything else, it attempted to
parse gibberish as a script.

One of the errors we saw was something like this:

    ld.lld: error: unclosed comment in a linker script

Another was like this:

    ld.lld: error: trampled.o:8513: unclosed quote

The second type of error was far more useful, as the inclusion of the filename
helped with diagnosis. Perhaps the filename could be mentioned in all such
diagnostics?

Reproducible with commit d080635bf:

$ echo '/*' > comment.script && ./bin/ld.lld comment.script
ld.lld: error: unclosed comment in a linker script

-- 
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/20200721/e96d3db0/attachment.html>


More information about the llvm-bugs mailing list