mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Properly emit ctors / dtors with priorities into desired sections
and let linker handle the rest. This finally fixes PR5329 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,8 +31,6 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
|
||||
if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5))
|
||||
CommDirectiveSupportsAlignment = false;
|
||||
|
||||
StructorOutputOrder = Structors::PriorityOrder;
|
||||
|
||||
TextSection // .text
|
||||
= Ctx->getMachOSection("__TEXT", "__text",
|
||||
MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
|
||||
@@ -260,12 +258,10 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
|
||||
}
|
||||
}
|
||||
|
||||
StructorOutputOrder = Structors::ReversePriorityOrder;
|
||||
|
||||
// ELF
|
||||
BSSSection =
|
||||
Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
|
||||
ELF::SHF_WRITE |ELF::SHF_ALLOC,
|
||||
ELF::SHF_WRITE | ELF::SHF_ALLOC,
|
||||
SectionKind::getBSS());
|
||||
|
||||
TextSection =
|
||||
@@ -389,8 +385,6 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
|
||||
|
||||
void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) {
|
||||
// COFF
|
||||
StructorOutputOrder = Structors::ReversePriorityOrder;
|
||||
|
||||
TextSection =
|
||||
Ctx->getCOFFSection(".text",
|
||||
COFF::IMAGE_SCN_CNT_CODE |
|
||||
|
Reference in New Issue
Block a user