[PATCH] D25234: [LLD][ARM] Garbage collection support for .ARM.exidx sections

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 02:28:54 PDT 2016


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

Thanks for the comments. I've made the suggested review changes.

Yes it is guaranteed that there is a 1:1 mapping between a .ARM.exidx section and an executable section. It is stated in the exceptions spec[*] and if it weren't true then SHF_LINK_ORDER couldn't work reliably.

I've cut the assembly down a bit in the test. The difficulty often isn't the ARM assembly, it is provoking the assembler to generate the necessary exception tables. For example .cantunwind and .handlerdata need .fnstart and .fnend to be accepted.

[X] 4.4 The object producer interface (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf)

An object producer must generate:

- One fragment of index table for each code section.
- One exception-handling table entry corresponding to each function that may need to be unwound.

Each fragment of index table (read-only data) must be generated in its own ELF section. It must contain an index entry for each non-leaf function in the associated code section, in the same order as that of the functions in the code section. The index table section name must be .ARM.exidx optionally followed by further characters. The section type must be SHT_ARM_EXIDX (see [AAELF]). It must have the SHF_LINK_ORDER flag set in the sh_flags field of its section header and be linked to its associated code section via the sh_link field of its section header.


https://reviews.llvm.org/D25234

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.h
  ELF/MarkLive.cpp
  test/ELF/arm-exidx-gc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25234.73605.patch
Type: text/x-patch
Size: 6473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161005/caea8c63/attachment.bin>


More information about the llvm-commits mailing list