diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-28 23:11:35 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-28 23:11:35 +0000 |
| commit | 7fb9eabda56e02dce024bf92590d97c038700f7d (patch) | |
| tree | ceb61baa0131264d9d0c249c6ed7aef69b0817fe /lld/test/ELF/linkerscript/eh-frame-merge.s | |
| parent | 701593f1dbff225e39f8a25cfd2bfbc3f246f296 (diff) | |
| download | bcm5719-llvm-7fb9eabda56e02dce024bf92590d97c038700f7d.tar.gz bcm5719-llvm-7fb9eabda56e02dce024bf92590d97c038700f7d.zip | |
ELF: Write .eh_frame_hdr explicitly after writing .eh_frame.
This lets us remove the special case from Writer::writeSections(), and also
fixes a bug where .eh_frame_hdr isn't necessarily written in the correct
order if a linker script moves .eh_frame and .eh_frame_hdr into the same
output section.
Differential Revision: https://reviews.llvm.org/D58795
llvm-svn: 355153
Diffstat (limited to 'lld/test/ELF/linkerscript/eh-frame-merge.s')
| -rw-r--r-- | lld/test/ELF/linkerscript/eh-frame-merge.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lld/test/ELF/linkerscript/eh-frame-merge.s b/lld/test/ELF/linkerscript/eh-frame-merge.s new file mode 100644 index 00000000000..92175dba324 --- /dev/null +++ b/lld/test/ELF/linkerscript/eh-frame-merge.s @@ -0,0 +1,20 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "SECTIONS { .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame) } }" > %t.script +# RUN: ld.lld -o %t --no-threads --eh-frame-hdr --script %t.script %t.o +# RUN: llvm-readobj -s -u %t | FileCheck %s + +# CHECK: Name: .dah +# CHECK-NOT: Section +# CHECK: Address: 0x4D + +# CHECK: initial_location: 0x4d + +.global _start +_start: + nop + +.section .dah,"ax",@progbits +.cfi_startproc + nop +.cfi_endproc |

