mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
MC: ReadOnlyWithRel section kinds should map to rdata in COFF
Don't consider ReadOnlyWithRel as a writable section in COFF, they really belong in .rdata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
56c7cfe41f
commit
d80fc698f3
@ -865,9 +865,9 @@ static const char *getCOFFSectionNameForUniqueGlobal(SectionKind Kind) {
|
||||
return ".bss";
|
||||
if (Kind.isThreadLocal())
|
||||
return ".tls$";
|
||||
if (Kind.isWriteable())
|
||||
return ".data";
|
||||
return ".rdata";
|
||||
if (Kind.isReadOnly() || Kind.isReadOnlyWithRel())
|
||||
return ".rdata";
|
||||
return ".data";
|
||||
}
|
||||
|
||||
|
||||
@ -915,7 +915,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
if (Kind.isThreadLocal())
|
||||
return TLSDataSection;
|
||||
|
||||
if (Kind.isReadOnly())
|
||||
if (Kind.isReadOnly() || Kind.isReadOnlyWithRel())
|
||||
return ReadOnlySection;
|
||||
|
||||
// Note: we claim that common symbols are put in BSSSection, but they are
|
||||
|
@ -6,3 +6,6 @@ define void @f() {
|
||||
|
||||
@ptr = constant void ()* @f, section ".CRT$XLB", align 8
|
||||
; CHECK: .section .CRT$XLB,"rd"
|
||||
|
||||
@weak_array = weak_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @f to i8*)]
|
||||
; CHECK: .section .rdata,"rd",discard,weak_array
|
||||
|
Loading…
x
Reference in New Issue
Block a user