mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fix UseInitArray option for MIPS target.
llvm-svn: 163193
This commit is contained in:
parent
6274d26545
commit
a15abb3d65
@ -26,6 +26,7 @@ SSThreshold("mips-ssection-threshold", cl::Hidden,
|
|||||||
|
|
||||||
void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){
|
void MipsTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){
|
||||||
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
|
||||||
|
InitializeELF(TM.Options.UseInitArray);
|
||||||
|
|
||||||
SmallDataSection =
|
SmallDataSection =
|
||||||
getContext().getELFSection(".sdata", ELF::SHT_PROGBITS,
|
getContext().getELFSection(".sdata", ELF::SHT_PROGBITS,
|
||||||
|
14
test/CodeGen/Mips/init-array.ll
Normal file
14
test/CodeGen/Mips/init-array.ll
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
; RUN: llc -mtriple mipsel-unknown-linux -use-init-array < %s | FileCheck %s
|
||||||
|
|
||||||
|
target triple = "mipsel-unknown-linux"
|
||||||
|
|
||||||
|
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @test }]
|
||||||
|
; CHECK: .section
|
||||||
|
; CHECK: .init_array
|
||||||
|
; CHECK-NOT: .ctors
|
||||||
|
; CHECK: .4byte test
|
||||||
|
|
||||||
|
define internal void @test() section ".text.startup" {
|
||||||
|
entry:
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user