llvm.org GIT mirror llvm / 1875ce4
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 Chris Lattner 10 years ago
2 changed file(s) with 2 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
517517 SectionKind::getText());
518518 ConstTextCoalSection
519519 = getContext().getMachOSection("__TEXT", "__const_coal",
520 MCSectionMachO::S_COALESCED |
521 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
522 SectionKind::getText());
523 ConstDataCoalSection
524 = getContext().getMachOSection("__DATA","__const_coal",
525520 MCSectionMachO::S_COALESCED,
526521 SectionKind::getReadOnly());
527522 ConstDataSection // .const_data
1919
2020 ; TODO: linux drops this into .rodata, we drop it into ".gnu.linkonce.r.G2"
2121
22 ; DARWIN: .section __TEXT,__const_coal,coalesced,pure_instructions
22 ; DARWIN: .section __TEXT,__const_coal,coalesced
2323 ; DARWIN: _G2:
2424 ; DARWIN: .long 42
2525
8484 ; LINUX: .byte 1
8585 ; LINUX: .size G6, 1
8686
87 ; DARWIN: .section __TEXT,__const_coal,coalesced,pure_instructions
87 ; DARWIN: .section __TEXT,__const_coal,coalesced
8888 ; DARWIN: .globl _G6
8989 ; DARWIN: .weak_definition _G6
9090 ; DARWIN:_G6: