mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
make elf targets correctly handle constant pool entries that require relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e346e180f3
commit
af89a96c6b
@ -81,8 +81,13 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
|
|||||||
const Section *
|
const Section *
|
||||||
ELFTargetAsmInfo::getSectionForMergableConstant(uint64_t Size,
|
ELFTargetAsmInfo::getSectionForMergableConstant(uint64_t Size,
|
||||||
unsigned ReloInfo) const {
|
unsigned ReloInfo) const {
|
||||||
// FIXME: IF this global requires a relocation, can we really put it in
|
// If this constant pool entry has relocations, stick it into a relocatable
|
||||||
// rodata??? This should check ReloInfo like darwin.
|
// section.
|
||||||
|
if (ReloInfo == 2)
|
||||||
|
return DataRelROSection;
|
||||||
|
if (ReloInfo == 1)
|
||||||
|
return DataRelROLocalSection;
|
||||||
|
|
||||||
|
|
||||||
const char *SecName = 0;
|
const char *SecName = 0;
|
||||||
switch (Size) {
|
switch (Size) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user