[PATCH] D41379: [LLD] [COFF] Don't set the thumb bit in address table entries for data symbols
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 11:32:24 PST 2017
compnerd added inline comments.
================
Comment at: COFF/DLL.cpp:365
void writeTo(uint8_t *Buf) const override {
- uint32_t Bit = 0;
- // Pointer to thumb code must have the LSB set, so adjust it.
- if (Config->Machine == ARMNT)
- Bit = 1;
for (Export &E : Config->Exports) {
uint8_t *P = Buf + OutputSectionOff + E.Ordinal * 4;
----------------
Please make this `const`.
================
Comment at: COFF/DLL.cpp:369
+ // Pointer to thumb code must have the LSB set, so adjust it.
+ if (Config->Machine == ARMNT && !E.Data)
+ Bit = 1;
----------------
Can you hoist this to the beginning of the loop? Basically,
if (E.Data)
continue;
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41379
More information about the llvm-commits
mailing list