[PATCH] D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 07:54:48 PDT 2017


peter.smith created this revision.
Herald added subscribers: javed.absar, emaste.

When an OutputSection is larger than the branch range for a Target we need to place thunks such that they are always in range of their caller, and sufficiently spaced to maximise the number of callers that can use the thunk. We use the simple heuristic of placing the ThunkSection at intervals corresponding to a target specific branch range. If the OutputSection is small we put the thunks at the end of the executable sections.

The overall design for range thunks is for each InputSectionDescription pre-create ThunkSections at regularly spaced intervals in which we can place range extension thunks that are within range of their caller. This is similar to the stub-groups implemented by bfd and clang.

This is patch 6/11 of range thunks. It is dependent on https://reviews.llvm.org/D34688 and its dependencies.


https://reviews.llvm.org/D34689

Files:
  ELF/Arch/ARM.cpp
  ELF/Relocations.cpp
  ELF/Relocations.h
  ELF/Target.h
  test/ELF/arm-thumb-thunk-symbols.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34689.104164.patch
Type: text/x-patch
Size: 8106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170627/e83f7b85/attachment.bin>


More information about the llvm-commits mailing list