Canonicalize output section name for .ARM.exidx sections
authorPeter Smith <peter.smith@linaro.org>
Wed, 24 Aug 2016 09:08:54 +0000 (09:08 +0000)
committerPeter Smith <peter.smith@linaro.org>
Wed, 24 Aug 2016 09:08:54 +0000 (09:08 +0000)
commita52864a78c790bcd1d217143a817973d6becb400
treea83418027c6d3bfea0e15cbd095b8fcf9a5ff659
parent1164cae527ace6b4f4eba2121f161dea7fb005ae
Canonicalize output section name for .ARM.exidx sections

The ARM Exception handling ABI requires that all ARM exception index
table sections have a prefix of .ARM.exidx and are combined into a
single contiguous block either in their own output section or as part
of another output section.

In general clang will output a single .ARM.exidx section per object,
but will use .ARM.exidx.<section name> when -ffunction-sections is used.

This change canonicalizes the names of sections with the .ARM.exidx
prefix to just .ARM.exidx, which ensures that there is only a single
output section.

Differential Revision: https://reviews.llvm.org/D23775

llvm-svn: 279617
lld/ELF/Writer.cpp
lld/test/ELF/arm-exidx-output.s [new file with mode: 0644]