[Git][ghc/ghc][master] Rts linker: add case for pc-rel 64 relocation

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Aug 1 04:48:25 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00
Rts linker: add case for pc-rel 64 relocation

part of the upstream haskell.nix patches

- - - - -


1 changed file:

- rts/linker/PEi386.c


Changes:

=====================================
rts/linker/PEi386.c
=====================================
@@ -2096,6 +2096,15 @@ ocResolve_PEi386 ( ObjectCode* oc )
                    *(uint32_t *)pP = (uint32_t)v;
                    break;
                }
+            case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */
+               {
+                   /* mingw will emit this for a pc-rel 64 relocation */
+                   uint64_t A;
+                   checkProddableBlock(oc, pP, 8);
+                   A = *(uint64_t*)pP;
+                   *(uint64_t *)pP = S + A - (intptr_t)pP;
+                   break;
+               }
             case 4: /* R_X86_64_PC32 (ELF constant 2) - IMAGE_REL_AMD64_REL32 (PE constant 4) */
                {
                    intptr_t v;



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bfe4b3d3bbb98b39169fad063c6c32f06d167756
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/20240801/df7ee997/attachment.html>


More information about the ghc-commits mailing list