mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-15 06:25:53 +00:00
two changes:
1) nuke ConstDataCoalSection, which is dead. 2) revise my previous patch for rdar://8018335, which was completely wrong. Specifically, it doesn't make sense to mark __TEXT,__const_coal as PURE_INSTRUCTIONS, because it is for readonly data. templates (it turns out) go to const_coal_nt. The real fix for rdar://8018335 was to give ConstTextCoalSection a section kind of ReadOnly instead of Text. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -518,11 +518,6 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
|
|||||||
SectionKind::getText());
|
SectionKind::getText());
|
||||||
ConstTextCoalSection
|
ConstTextCoalSection
|
||||||
= getContext().getMachOSection("__TEXT", "__const_coal",
|
= getContext().getMachOSection("__TEXT", "__const_coal",
|
||||||
MCSectionMachO::S_COALESCED |
|
|
||||||
MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
|
|
||||||
SectionKind::getText());
|
|
||||||
ConstDataCoalSection
|
|
||||||
= getContext().getMachOSection("__DATA","__const_coal",
|
|
||||||
MCSectionMachO::S_COALESCED,
|
MCSectionMachO::S_COALESCED,
|
||||||
SectionKind::getReadOnly());
|
SectionKind::getReadOnly());
|
||||||
ConstDataSection // .const_data
|
ConstDataSection // .const_data
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
|
; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
|
||||||
|
|
||||||
; DARWIN: .section __TEXT,__const_coal,coalesced,pure_instructions
|
; DARWIN: .section __TEXT,__const_coal,coalesced
|
||||||
; DARWIN: _G2:
|
; DARWIN: _G2:
|
||||||
; DARWIN: .long 42
|
; DARWIN: .long 42
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
; LINUX: .byte 1
|
; LINUX: .byte 1
|
||||||
; LINUX: .size G6, 1
|
; LINUX: .size G6, 1
|
||||||
|
|
||||||
; DARWIN: .section __TEXT,__const_coal,coalesced,pure_instructions
|
; DARWIN: .section __TEXT,__const_coal,coalesced
|
||||||
; DARWIN: .globl _G6
|
; DARWIN: .globl _G6
|
||||||
; DARWIN: .weak_definition _G6
|
; DARWIN: .weak_definition _G6
|
||||||
; DARWIN:_G6:
|
; DARWIN:_G6:
|
||||||
|
Reference in New Issue
Block a user