mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Fix the defaults for .eh_frame. We were marking it as writable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -255,7 +255,7 @@ getELFKindForNamedSection(StringRef Name, SectionKind K) {
|
|||||||
return SectionKind::getThreadBSS();
|
return SectionKind::getThreadBSS();
|
||||||
|
|
||||||
if (Name == ".eh_frame")
|
if (Name == ".eh_frame")
|
||||||
return SectionKind::getDataRel();
|
return SectionKind::getReadOnlyWithRel();
|
||||||
|
|
||||||
return K;
|
return K;
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ getELFSectionFlags(SectionKind K) {
|
|||||||
if (K.isText())
|
if (K.isText())
|
||||||
Flags |= ELF::SHF_EXECINSTR;
|
Flags |= ELF::SHF_EXECINSTR;
|
||||||
|
|
||||||
if (K.isWriteable())
|
if (K.isWriteable() && !K.isReadOnlyWithRel())
|
||||||
Flags |= ELF::SHF_WRITE;
|
Flags |= ELF::SHF_WRITE;
|
||||||
|
|
||||||
if (K.isThreadLocal())
|
if (K.isThreadLocal())
|
||||||
|
5
test/CodeGen/X86/eh_frame.ll
Normal file
5
test/CodeGen/X86/eh_frame.ll
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
; RUN: llc < %s -mtriple x86_64-unknown-linux-gnu | FileCheck %s
|
||||||
|
|
||||||
|
@__FRAME_END__ = constant [1 x i32] zeroinitializer, section ".eh_frame"
|
||||||
|
|
||||||
|
; CHECK: .section .eh_frame,"a",@progbits
|
Reference in New Issue
Block a user