void-packages/srcpkgs/fpc/files/musl-__libc_csu.patch

22 lines
840 B
Diff
Raw Normal View History

Hack to remove reference to the (glibc only) symbols __libc_csu_init
and __libc_csu_fini. They are the libc initialize and finish function
pointers. Not sure if this actually works, or if calling the pointers
to be stored there before/after the call to PASCALMAIN is required.
--- fpcsrc/rtl/linux/x86_64/cprt0.as 2015-12-16 16:28:03.000000000 +0100
+++ fpcsrc/rtl/linux/x86_64/cprt0.as 2018-01-02 14:41:08.598952141 +0100
@@ -63,9 +63,10 @@
pushq %rsp
/* Pass address of our own entry points to .fini and .init. */
- movq __libc_csu_init@GOTPCREL(%rip), %rcx
- movq __libc_csu_fini@GOTPCREL(%rip), %r8
-
+/* not availble in musl libc
+ * movq __libc_csu_init@GOTPCREL(%rip), %rcx
+ * movq __libc_csu_fini@GOTPCREL(%rip), %r8
+ */
movq main_stub@GOTPCREL(%rip), %rdi
/* Call the user's main function, and exit with its value.