X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FPositionIndependentCode.hs;h=6a94de22b2251ad597b6c21b44aa8973caa00964;hb=f83010b119096699d1efef2f7bb45460719c48f9;hp=e2db9da62d5a25105c0df80e671e52cd65f5b280;hpb=1569075dbdc0b46720a5b2d89df3fb100cf84e3d;p=ghc-hetmet.git diff --git a/compiler/nativeGen/PositionIndependentCode.hs b/compiler/nativeGen/PositionIndependentCode.hs index e2db9da..6a94de2 100644 --- a/compiler/nativeGen/PositionIndependentCode.hs +++ b/compiler/nativeGen/PositionIndependentCode.hs @@ -131,7 +131,7 @@ cmmMakePicReference :: CLabel -> CmmExpr -- everything gets relocated at runtime cmmMakePicReference lbl - | opt_PIC && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ + | (opt_PIC || not opt_Static) && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ CmmReg (CmmGlobal PicBaseReg), CmmLit $ picRelative lbl ] @@ -372,6 +372,9 @@ pprGotDeclaration = Pretty.empty -- On Darwin, we have to generate our own stub code for lazy binding.. -- For each processor architecture, there are two versions, one for PIC -- and one for non-PIC. +-- +-- Whenever you change something in this assembler output, make sure +-- the splitter in driver/split/ghc-split.lprl recognizes the new output pprImportedSymbol importedLbl #if powerpc_TARGET_ARCH | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl