Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] - Do not try to create .eh_frame_hdr for relocatable output.
.eh_frame_hdr is a header constructed for .eh_frame sections. We do not proccess .eh_frame when doing relocatable output, so should not try to create .eh_frame_hdr too. Previous behavior without this patch is segfault. Fixes PR32118. Differential revision: https://reviews.llvm.org/D30566 llvm-svn: 297365
- Loading branch information
George Rimar
committed
Mar 9, 2017
1 parent
e2de03f
commit 1c74c2f
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# REQUIRES: x86 | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o | ||
# RUN: ld.lld --eh-frame-hdr -r %t.o -o %t | ||
# RUN: llvm-readobj -s %t | FileCheck %s | ||
|
||
# CHECK: Sections [ | ||
# CHECK-NOT: Name: .eh_frame_hdr | ||
|
||
.section .foo,"ax",@progbits | ||
.cfi_startproc | ||
.cfi_endproc |