This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Don't set the thumb bit in address table entries for data symbols
ClosedPublic

Authored by mstorsjo on Dec 18 2017, 11:58 PM.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

mstorsjo created this revision.Dec 18 2017, 11:58 PM
compnerd added inline comments.Dec 19 2017, 11:32 AM
COFF/DLL.cpp
365

Please make this const.

369

Can you hoist this to the beginning of the loop? Basically,

if (E.Data)
  continue;
mstorsjo added inline comments.Dec 19 2017, 11:39 AM
COFF/DLL.cpp
365

Well I'm not actually touching this line (contrary to what the phabricator diff shows), it's the Bit lines that I'm moving into the loop, so this is unrelated. A git/svn diff that does care about whitespace shows it differently.

369

No, we're not only setting the thumb bit here, we're also writing the full address in itself in this loop - in that case we wouldn't write any address at all for data symbols

compnerd accepted this revision.Dec 19 2017, 1:57 PM
compnerd added inline comments.
COFF/DLL.cpp
365

Right, I realize that you are just moving it, but you are moving it, so seems like a good time to just fix that.

369

Oh, yeah, missed that due to the weird side-by-side diff.

This revision is now accepted and ready to land.Dec 19 2017, 1:57 PM
This revision was automatically updated to reflect the committed changes.