- Make the MipsTargetInfo template class with ELFType argument. Use the argument to select an appropriate relocation type and read/write routines.
- Add template function add32 to add-and-write relocation value in both big and little endian cases. Keep the add32le to reduce code changes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with nits.
ELF/Target.cpp | ||
---|---|---|
93 ↗ | (On Diff #37343) | template <bool IsLE> would be better for consistency. |
93–101 ↗ | (On Diff #37343) | I'd define add32be and use add32le and add32be from add32<>. template <> void add32<true>(uint8_t *L, int32_t V) { add32le(L, V); } template <> void add32<false>(uint8_t *L, int32_t V) { add32be(L, V); } |
585–586 ↗ | (On Diff #37343) | Unrelated style change. |
Comment Actions
Thanks for your review.
ELF/Target.cpp | ||
---|---|---|
585–586 ↗ | (On Diff #37343) | Due the <ELFT> it is now impossible to keep both BaseAddr and SymVA arguments on the same line without 80-column restriction violation. |