[llvm-bugs] [Bug 31128] New: Assigning to location counter without a space gives confusing error
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 22 15:01:52 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31128
Bug ID: 31128
Summary: Assigning to location counter without a space gives
confusing error
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: arichardson.kde at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
in the following condensed linker script I get a confusing error message:
SECTIONS
{
/* ...*/
.= __code_body__;
/*...*/
}
Results in:
/home/alr48/cheri/output/sdk256/bin/cheri-unknown-freebsd-ld: error:
/..../sandbox.ld:66: : expected, but got ;
/home/alr48/cheri/output/sdk256/bin/cheri-unknown-freebsd-ld: error:
/..../sandbox.ld:66: .= __code_body__;
/home/alr48/cheri/output/sdk256/bin/cheri-unknown-freebsd-ld: error:
/..../sandbox.ld:66: ^
LLD will accept this script only after adding a space between '.' and '='
whereas GNU ld accepts this without complaining.
I am not sure if the space is required (all I can see is
https://sourceware.org/binutils/docs/ld/Simple-Assignments.html#Simple-Assignments
where there is no mention of spaces being required). In any case, a less
confusing error message would be great.
--
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/20161122/8474050a/attachment.html>
More information about the llvm-bugs
mailing list