aboutsummaryrefslogtreecommitdiff
path: root/development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch
diff options
context:
space:
mode:
authorAntonio Leal <antonioleal@yahoo.com>2024-01-15 07:57:30 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-01-15 08:20:19 +0700
commitd730b54836fddf6e20ffb9eb142eb54b4a93ec39 (patch)
tree90571fc2d0c8a09ea48f6bda66ed7819173f13f4 /development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch
parent431f1a204cd7cb0c9f9407367d5203a934ade392 (diff)
development/fpc: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch')
-rw-r--r--development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch b/development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch
new file mode 100644
index 0000000000..096c058912
--- /dev/null
+++ b/development/fpc/patches/Fix-liking-with-libc-when-PIC-is-enabled.patch
@@ -0,0 +1,24 @@
+From: Florian Klämpfl <florian@freepascal.org>
+Date: Mon Aug 3 19:42:14 2020 UTC
+Description: @PLT is needed for calls to link it properly with pic code
+
+--- fpc.orig/fpcsrc/rtl/linux/x86_64/si_c.inc
++++ fpc/fpcsrc/rtl/linux/x86_64/si_c.inc
+@@ -86,7 +86,7 @@
+
+ { start the program }
+ xorq %rbp,%rbp
+- call PASCALMAIN
++ call PASCALMAIN@PLT
+ {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
+ hlt
+ end;
+@@ -162,7 +162,7 @@
+
+ { Call the user's main function, and exit with its value.
+ But let the libc call main. }
+- call libc_start_main
++ call libc_start_main@PLT
+
+ hlt { Crash if somehow `exit' does return. }
+ end;