diff options
author | Ian Lynagh <igloo@earth.li> | 2011-10-19 16:36:40 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-10-19 16:36:40 +0100 |
commit | a6f9ebc58b0dc632bb01d0f202a7581ed02466ce (patch) | |
tree | 8171dd582c11f3ea058aa2bf35a028aa4228490b /compiler/cmm | |
parent | 7ef5b2939076902ee54c9f1a2c50d55b274e4388 (diff) | |
download | haskell-a6f9ebc58b0dc632bb01d0f202a7581ed02466ce.tar.gz |
Add "have subsections via symbols" to the Platform type
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CLabel.hs | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index a96f78cde1..717a38a6db 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -1103,37 +1103,38 @@ asmTempLabelPrefix platform = pprDynamicLinkerAsmLabel :: Platform -> DynamicLinkerLabelInfo -> CLabel -> SDoc pprDynamicLinkerAsmLabel platform dllInfo lbl - = if platform == Platform ArchX86_64 OSDarwin - then case dllInfo of - CodeStub -> char 'L' <> pprCLabel platform lbl <> text "$stub" - SymbolPtr -> char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr" - GotSymbolPtr -> pprCLabel platform lbl <> text "@GOTPCREL" - GotSymbolOffset -> pprCLabel platform lbl - else if platformOS platform == OSDarwin - then case dllInfo of - CodeStub -> char 'L' <> pprCLabel platform lbl <> text "$stub" - SymbolPtr -> char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr" - _ -> panic "pprDynamicLinkerAsmLabel" - else if platformArch platform == ArchPPC && osElfTarget (platformOS platform) - then case dllInfo of - CodeStub -> pprCLabel platform lbl <> text "@plt" - SymbolPtr -> text ".LC_" <> pprCLabel platform lbl - _ -> panic "pprDynamicLinkerAsmLabel" - else if platformArch platform == ArchX86_64 && osElfTarget (platformOS platform) - then case dllInfo of - CodeStub -> pprCLabel platform lbl <> text "@plt" - GotSymbolPtr -> pprCLabel platform lbl <> text "@gotpcrel" - GotSymbolOffset -> pprCLabel platform lbl - SymbolPtr -> text ".LC_" <> pprCLabel platform lbl + = if platformOS platform == OSDarwin + then if platformArch platform == ArchX86_64 + then case dllInfo of + CodeStub -> char 'L' <> pprCLabel platform lbl <> text "$stub" + SymbolPtr -> char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr" + GotSymbolPtr -> pprCLabel platform lbl <> text "@GOTPCREL" + GotSymbolOffset -> pprCLabel platform lbl + else case dllInfo of + CodeStub -> char 'L' <> pprCLabel platform lbl <> text "$stub" + SymbolPtr -> char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr" + _ -> panic "pprDynamicLinkerAsmLabel" + else if osElfTarget (platformOS platform) - then case dllInfo of - CodeStub -> pprCLabel platform lbl <> text "@plt" - SymbolPtr -> text ".LC_" <> pprCLabel platform lbl - GotSymbolPtr -> pprCLabel platform lbl <> text "@got" - GotSymbolOffset -> pprCLabel platform lbl <> text "@gotoff" + then if platformArch platform == ArchPPC + then case dllInfo of + CodeStub -> pprCLabel platform lbl <> text "@plt" + SymbolPtr -> text ".LC_" <> pprCLabel platform lbl + _ -> panic "pprDynamicLinkerAsmLabel" + else if platformArch platform == ArchX86_64 + then case dllInfo of + CodeStub -> pprCLabel platform lbl <> text "@plt" + GotSymbolPtr -> pprCLabel platform lbl <> text "@gotpcrel" + GotSymbolOffset -> pprCLabel platform lbl + SymbolPtr -> text ".LC_" <> pprCLabel platform lbl + else case dllInfo of + CodeStub -> pprCLabel platform lbl <> text "@plt" + SymbolPtr -> text ".LC_" <> pprCLabel platform lbl + GotSymbolPtr -> pprCLabel platform lbl <> text "@got" + GotSymbolOffset -> pprCLabel platform lbl <> text "@gotoff" else if platformOS platform == OSMinGW32 - then case dllInfo of - SymbolPtr -> text "__imp_" <> pprCLabel platform lbl - _ -> panic "pprDynamicLinkerAsmLabel" + then case dllInfo of + SymbolPtr -> text "__imp_" <> pprCLabel platform lbl + _ -> panic "pprDynamicLinkerAsmLabel" else panic "pprDynamicLinkerAsmLabel" |