diff options
Diffstat (limited to 'system/binutils/musl-preinit-array.patch')
-rw-r--r-- | system/binutils/musl-preinit-array.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/system/binutils/musl-preinit-array.patch b/system/binutils/musl-preinit-array.patch new file mode 100644 index 000000000..9932f3c7f --- /dev/null +++ b/system/binutils/musl-preinit-array.patch @@ -0,0 +1,35 @@ +musl libc currently does not run .preinit_array functions. + +--- binutils-2.41/ld/testsuite/ld-elf/elf.exp.old 2023-09-22 20:55:13.894385414 -0500 ++++ binutils-2.41/ld/testsuite/ld-elf/elf.exp 2023-09-22 21:31:13.354594152 -0500 +@@ -427,17 +427,21 @@ + run_ld_link_exec_tests $array_tests_pie $xfails + + if { $STATIC_PIE_LDFLAGS != "" } then { ++ if { ![istarget *-*-musl*] } then { ++ run_ld_link_exec_tests [list \ ++ [list \ ++ "Static PIE preinit array" \ ++ "$STATIC_PIE_LDFLAGS" \ ++ "" \ ++ {preinit.c} \ ++ "preinit-static-pie" \ ++ "preinit.out" \ ++ "-fPIE" \ ++ ] \ ++ ] ++ } + run_ld_link_exec_tests [list \ + [list \ +- "Static PIE preinit array" \ +- "$STATIC_PIE_LDFLAGS" \ +- "" \ +- {preinit.c} \ +- "preinit-static-pie" \ +- "preinit.out" \ +- "-fPIE" \ +- ] \ +- [list \ + "Static PIE init array" \ + "$STATIC_PIE_LDFLAGS" \ + "" \ |