mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user