[PATCH] D51089: [LLD] [COFF] [RFC] Add support for creating range extension thunks for ARM

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 02:14:54 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, peter.smith, pcc, rnk.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls.

The algorithm for adding thunks is pretty simple so far; once we need a thunk and none of the existing ones are suitable, we add a  new one after the current SectionChunk (which should be as close as possible as we can get it). This is slightly wasteful, leading to slightly more thunks than the ideal.

We add new thunks by a .insert on the OutputSection Chunks std::vector, which probably isn't ideal.

The code is partially inspired by the thunks support in the ELF linker, but that linker has got a much larger existing support framework for thunks.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D51089

Files:
  COFF/Chunks.cpp
  COFF/Chunks.h
  COFF/ICF.cpp
  COFF/PDB.cpp
  COFF/Writer.cpp
  COFF/Writer.h
  test/COFF/arm-thumb-branch-error.s
  test/COFF/arm-thumb-branch-thunk.s
  test/COFF/arm-thumb-branch20-error.s
  test/COFF/arm-thumb-branch20-thunk.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51089.161900.patch
Type: text/x-patch
Size: 14704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180822/392c5fad/attachment.bin>


More information about the llvm-commits mailing list