https://llvm.org/bugs/show_bug.cgi?id=30988
Bug ID: 30988 Summary: Wrong diagnostic for undefined ELF temporary label Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: MC Assignee: unassignedb...@nondot.org Reporter: dav...@freebsd.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified [davide@cupiditate bin]$ cat patatino.s .text jmp .Lblah [davide@cupiditate bin]$ ./llvm-mc patatino.s -filetype=obj -o patatino <unknown>:0: error: Undefined temporary symbol The reason why this happens is that we don't have a SM location, as this error isn't diagnosed until we reach the ELFObjectWriter. ``` if (Symbol.isTemporary() && Symbol.isUndefined()) { Ctx.reportError(SMLoc(), "Undefined temporary symbol"); continue; ``` Couple of notes: -> This used to be a fatal error, then it was converted to `reportError`. -> GNU as doesn't seem to care about undefined labels, and assemble that snippet just fine. The resulting assembly is: $ objdump -t ./foo |grep blah 0000000000000000 *UND* 0000000000000000 .Lblah $ objdump -d ./foo 0000000000000000 <.text>: 0: e9 00 00 00 00 jmpq 0x5 Rafael pointed out this is an area that could use some love, and pointed out https://llvm.org/bugs/show_bug.cgi?id=23933 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs