llvm-project/lld/test
Rui Ueyama 1720ef1343 Add terminator to .eh_frame sections
Patch by Mark Kettenis.

Currenlty ld.lld does not add a terminator (a CIE with its length field
set to zero) to the .eh_frame sections it generates.  While the relevant
standards (the AMD64 SysV ABI and the Linux LSB) are not explicit about
this, such a terminator is expected by some unwinder implementations and
seems to be always emitted by ld.bfd. In addition to that, the Linux LSB

  https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html#EHFRAME

explicitly says that

  The .eh_frame section shall contain 1 or more Call Frame Information
  (CFI) records.

Currently, if the .eh_frame sections of the input files only contain
terminators, ld.lld emits a zero=sized .eh_frame section
which clearly doesn't meet that requirement.

The diff makes sure a terminator gets added to each .eh_frame section
and adjusts all the relevant tests to account for that.  An additional
test isn't needed as these adjustments mean that the existence of the
terminator is tested for by several tests already.

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

llvm-svn: 296378
2017-02-27 20:44:59 +00:00
..
COFF [COFF] added test for thinlto 2017-02-23 23:42:24 +00:00
Driver/Inputs Remove the old ELF linker. 2016-02-28 00:10:58 +00:00
ELF Add terminator to .eh_frame sections 2017-02-27 20:44:59 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:09:39 +00:00
darwin Add the GC commandline options and throw errors if they are used 2016-01-15 17:39:02 +00:00
mach-o Partially revert r287009: Remove trailing whitespace. 2016-11-15 19:09:13 +00:00
CMakeLists.txt [test] Fix zlib cond when building stand-alone, clean up 2017-02-08 20:08:29 +00:00
lit.cfg [test] Fix zlib cond when building stand-alone, clean up 2017-02-08 20:08:29 +00:00
lit.site.cfg.in [test] Fix zlib cond when building stand-alone, clean up 2017-02-08 20:08:29 +00:00