Errors in getDynRel are quite common, so it might be worth printing exact place of error.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/Relocations.cpp | ||
---|---|---|
719 ↗ | (On Diff #79100) | I think we don't put a period at end of a sentence in error messages. |
722 ↗ | (On Diff #79100) | Add a blank line between code and comment. |
ELF/Target.cpp | ||
697–698 ↗ | (On Diff #79100) | Probably unintended change. |
739–740 ↗ | (On Diff #79100) | Ditto |
821–824 ↗ | (On Diff #79100) | Ditto |
842 ↗ | (On Diff #79100) | Ditto (and so on) |
ELF/Target.h | ||
29–31 ↗ | (On Diff #79100) | 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 ↗ | (On Diff #79100) | 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 ↗ | (On Diff #79197) | We have Config->Pic, so it should be named isPicRel. |
722 ↗ | (On Diff #79100) | ping |
ELF/Target.cpp | ||
1250 ↗ | (On Diff #79197) | You can just return Type because R_AARCH64_ABS32 was just a dummy value to return something in an error condition. |
1980 ↗ | (On Diff #79197) | Remove () after return. |
1985 ↗ | (On Diff #79197) | This is I think just a dummy value, too. |