[PATCH] D35640: [lld] [COFF] Align import address chunks to the pointer size

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 13:34:04 PDT 2017


mstorsjo created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

This fixes cases on ARM64 when importing from more than one DLL, in case the imports from the first DLL ended up unaligned.

When fixing up a IMAGE_REL_ARM64_PAGEOFFSET_12L, which shifts the offset by the load/store size, check that the shift doesn't discard any bits. (This would also detect if the import address chunks were unaligned.)


https://reviews.llvm.org/D35640

Files:
  COFF/Chunks.cpp
  COFF/DLL.cpp
  test/COFF/Inputs/library2-arm64.lib
  test/COFF/Inputs/library2.def
  test/COFF/arm64-import2.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35640.107365.patch
Type: text/x-patch
Size: 4981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170719/eb6ceaea/attachment.bin>


More information about the llvm-commits mailing list