mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
add an explanatory comment about why we drop these in readonly and
not in mergable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41d89c2572
commit
a7defb7150
@ -247,7 +247,9 @@ static SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV,
|
||||
case Constant::LocalRelocation:
|
||||
// In static relocation model, the linker will resolve all addresses, so
|
||||
// the relocation entries will actually be constants by the time the app
|
||||
// starts up.
|
||||
// starts up. However, we can't put this into a mergable section, because
|
||||
// the linker doesn't take relocations into consideration when it tries to
|
||||
// merge entries in the section.
|
||||
if (ReloModel == Reloc::Static)
|
||||
return SectionKind::ReadOnly;
|
||||
|
||||
@ -258,7 +260,9 @@ static SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV,
|
||||
case Constant::GlobalRelocations:
|
||||
// In static relocation model, the linker will resolve all addresses, so
|
||||
// the relocation entries will actually be constants by the time the app
|
||||
// starts up.
|
||||
// starts up. However, we can't put this into a mergable section, because
|
||||
// the linker doesn't take relocations into consideration when it tries to
|
||||
// merge entries in the section.
|
||||
if (ReloModel == Reloc::Static)
|
||||
return SectionKind::ReadOnly;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user