Errors in getDynRel are quite common, so it might be worth printing exact place of error.
Details
Diff Detail
Event Timeline
ELF/Relocations.cpp | ||
---|---|---|
719 | I think we don't put a period at end of a sentence in error messages. | |
722 | Add a blank line between code and comment. | |
ELF/Target.cpp | ||
697–698 | Probably unintended change. | |
739–740 | Ditto | |
821–824 | Ditto | |
842 | Ditto (and so on) | |
ELF/Target.h | ||
29–31 | The meaning of the second return value is not very clear. How about this? We can add Target::isAbsRel(uint32_t). If it returns true, we should report an error. Then I think we don't need to modify getDynRel. |
ELF/Target.h | ||
---|---|---|
29–31 | isAbsRel is a bit confusing (in position independent code RelExpr may be R_GOT_PC as well). How about isPICRel ? |
LGTM with these comments addressed.
ELF/Relocations.cpp | ||
---|---|---|
716 | We have Config->Pic, so it should be named isPicRel. | |
722 | ping | |
ELF/Target.cpp | ||
1270–1271 | You can just return Type because R_AARCH64_ABS32 was just a dummy value to return something in an error condition. | |
2001 | Remove () after return. | |
2003–2006 | This is I think just a dummy value, too. |
We have Config->Pic, so it should be named isPicRel.