GNU LD allows ASSERT commands to be in output section descriptions.
Note that LD also mandates that ASSERT commands in this context must
end with a semicolon.
Details
- Reviewers
ruiu llvm-commits - Group Reviewers
lld
Diff Detail
Event Timeline
LGTM. Thanks!
test/ELF/linkerscript/assert.s | ||
---|---|---|
33–38 | Can you write this in one line? Look at other tests in this file. |
test/ELF/linkerscript/assert.s | ||
---|---|---|
33–38 | Sure. I noticed the recent changes to the tests in this file and changed the test following this one to be on one line. I left this one alone b/c it was a bit longer. Is it OK to exceed 80 columns? |
test/ELF/linkerscript/assert.s | ||
---|---|---|
33–38 | I'd make it one line even if it exceeds 80 columns a bit. Because otherwise an error message for this test would be really hard to read. It becomes something like this as it contains lots of spaces. error: foo1.o:1: SECTIONS { <lots of spaces> .foo { <lots of spaces> ASSERT(...) <lots of spaces> ... error: foo1.o:1: <lots of spaces> ^ error here That's why I changed other tests. |
Don't you need to pass Dot instead of 0, do you?