This patch adds a section name to error messages.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/ELF/InputFiles.cpp | ||
---|---|---|
520 | Make it a bit more detailed, e.g. section size (1337) must be a multiple of sh_entsize (4) |
lld/test/ELF/invalid/merge-writable.s | ||
---|---|---|
1 | This file is actually already merge-writable.s. Am I missing something? |
lld/test/ELF/invalid/merge-writable.s | ||
---|---|---|
1 | There is an existing file writable-merge.s I think we can reuse the test, though probably rename it to merge-writable.s |
lld/test/ELF/invalid/merge-invalid-size.s | ||
---|---|---|
4 | You should probably be able to do something like the following I think: // ... | FileCheck %s - DFILE=%t.o // CHECK: [[FILE]]:(.foo): SHF_MERGE section size (2) must be a multiple of sh_entsize (4) |
lld/test/ELF/invalid/merge-invalid-size.s | ||
---|---|---|
4 | I'm not sure if that use of -D makes things easier, so I'd like to stick with this. |
lld/test/ELF/invalid/merge-invalid-size.s | ||
---|---|---|
4 | Hardcoding something is indeed easier. Problem is that here you depend on the naming rules. |
lld/test/ELF/invalid/merge-invalid-size.s | ||
---|---|---|
4 | Yeah, you are right, though I'm not too worried about that. If writing a full filename here is too much, I'd change this to .o:(.foo) so that it is not too picky about filenames. |
lld/test/ELF/invalid/merge-invalid-size.s | ||
---|---|---|
4 | That is in line with what we usually did in LLD before and sounds good to me. |
Make it a bit more detailed, e.g.
section size (1337) must be a multiple of sh_entsize (4)