[PATCH] D24032: [ARM] [LLD] Add support for SHF_LINK_ORDER flag to ARM Target
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 11:17:53 PDT 2016
ruiu added a comment.
We are doing something similar for Windows in which exception tables need to be sorted to allow runtime to binary-search it. Because COFF does not have a generic mechanism to enforce it, but rather it requires linkers sort exception table contents, we do it as a post-process. That is, we link everything normally, and then sort the output file buffer contents if the exception table is.
That is less generic mechanism, but I think I like it more than what ELF requires us do. It's straightforward, easy to understand and sufficient. On the other hand, SHF_LINK_ORDER would raise a lot of potential issues with other features of the linker as you described in this patch comment.
So I'm wondering if this works: after everything is done, but just before the buffer is committed to disk, find ".ARM.exidx" output section. If the section exists, sort the contents, assuming that the section contains an exception index table.
More information about the llvm-commits