[PATCH] D24728: [ARM][LLD] Add support for .ARM.exidx sections

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 04:27:15 PDT 2016


peter.smith updated this revision to Diff 71914.
peter.smith added a comment.

Thank you both for the comments.

Updated diff to address code-review comments.

It is an interesting question as to whether to merge sections during a relocatable link. ARM's proprietary linker has this policy although it calls its option partial linking rather than relocatable. This had the advantage of allowing the final link to do a better job with garbage collection as prematurely merged sections can't be picked apart in the final link. The two primary use cases for partial linking were placement in the armlink equivalent of a linker script; and performance, large static links could be sped up a small amount by building a partial object in place of a library.

The only advantages I can think of for merging sections at relocatable link time are that it would be faster as the linker has done more of the work of the final link. There might be some use case for a company distributing a single binary only object to a customer and the relocatable link makes this possible to guarantee the order of sections.

In summary I don't think that merging sections makes a difference to the vast majority of users, but it makes the linker less of a drop-in replacement for GNU ld as in some cases it will behave differently.


https://reviews.llvm.org/D24728

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.h
  ELF/MarkLive.cpp
  ELF/OutputSections.cpp
  ELF/Writer.cpp
  test/ELF/Inputs/arm-exidx-cantunwind.s
  test/ELF/arm-exidx-canunwind.s
  test/ELF/arm-exidx-order.s
  test/ELF/arm-exidx-relocatable.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24728.71914.patch
Type: text/x-patch
Size: 28151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/15c585b3/attachment.bin>


More information about the llvm-commits mailing list