This is a follow-up for https://reviews.llvm.org/D74545.
It adds test cases for each incorrect case returned in getRelocationTarget.
We probably should split invalid.test. For example, segments related errors and sections related errors can be separated.
|1 ↗||(On Diff #244607)|
Better yet would be to replace those tests which are testing library code with gtest unit tests to test the interfaces directly instead (and then additional tests in the tools folder to show the tools correctly handle the respective places properly).
Seems like this overlaps with reloc-no-sym.test? Could we get rid of one or the other?
relocation in a section...
is neither SHT_SYMTAB nor SHT_DYNSYM
This one is a bit different: here we have a SHT_REL section.
And the intention to have it also was to show the order of warnings/normal relocations.
So, I'd keep both. (btw, reloc-no-sym.test seems lacks GNU test and SHT_REL test and might need to be improved).