[Git][ghc/ghc][wip/angerman/aarch64-ncg] [aarch64/elf] fixup elf symbols

Moritz Angermann gitlab at gitlab.haskell.org
Fri Oct 23 15:27:37 UTC 2020



Moritz Angermann pushed to branch wip/angerman/aarch64-ncg at Glasgow Haskell Compiler / GHC


Commits:
0ed74a26 by Moritz Angermann at 2020-10-23T23:27:17+08:00
[aarch64/elf] fixup elf symbols

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/AArch64/Ppr.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/AArch64/Ppr.hs
=====================================
@@ -546,21 +546,21 @@ pprInstr platform instr = case instr of
     text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> char '#' <> int off -- XXX: check that off is in 12bits.
 
   LDR _f o1 (OpImm (ImmIndex lbl off)) ->
-    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl <> text "@page" $$
-    text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> ppr lbl <> text "@pageoff" $$
+    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl $$
+    text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> test ":lo12:" <> ppr lbl $$
     text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> char '#' <> int off -- XXX: check that off is in 12bits.
 
   LDR _f o1 (OpImm (ImmCLbl lbl')) | Just (_info, lbl) <- dynamicLinkerLabelInfo lbl' ->
-    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl <> text "@gotpage" $$
-    text "\tldr" <+> pprOp o1 <> comma <+> text "[" <> pprOp o1 <> comma <+> ppr lbl <> text "@gotpageoff" <> text "]"
+    text "\tadrp" <+> pprOp o1 <> comma <+> text ":got:" ppr lbl $$
+    text "\tldr" <+> pprOp o1 <> comma <+> text "[" <> pprOp o1 <> comma <+> text ":got_lo12:" <> ppr lbl <> text "]"
 
   LDR _f o1 (OpImm (ImmCLbl lbl)) | isForeignLabel lbl ->
-    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl <> text "@gotpage" $$
-    text "\tldr" <+> pprOp o1 <> comma <+> text "[" <> pprOp o1 <> comma <+> ppr lbl <> text "@gotpageoff" <> text "]"
+    text "\tadrp" <+> pprOp o1 <> comma <+> text ":got:" ppr lbl $$
+    text "\tldr" <+> pprOp o1 <> comma <+> text "[" <> pprOp o1 <> comma <+> text ":got_lo12:" <> ppr lbl <> text "]"
 
   LDR _f o1 (OpImm (ImmCLbl lbl)) ->
-    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl <> text "@page" $$
-    text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> ppr lbl <> text "@pageoff"
+    text "\tadrp" <+> pprOp o1 <> comma <+> ppr lbl $$
+    text "\tadd" <+> pprOp o1 <> comma <+> pprOp o1 <> comma <+> text ":lo12:" <> ppr lbl
 #endif
 
   LDR _f o1@(OpReg W8 (RegReal (RealRegSingle i))) o2 | i < 32 ->



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0ed74a2621004cd54473b4737de4c6c51037a11f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0ed74a2621004cd54473b4737de4c6c51037a11f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201023/b1fa60d5/attachment-0001.html>


More information about the ghc-commits mailing list