summaryrefslogtreecommitdiffstats
path: root/scripts/wrapper/ld-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wrapper/ld-wrapper')
-rwxr-xr-xscripts/wrapper/ld-wrapper19
1 files changed, 4 insertions, 15 deletions
diff --git a/scripts/wrapper/ld-wrapper b/scripts/wrapper/ld-wrapper
index f3f38054c..11f785d67 100755
--- a/scripts/wrapper/ld-wrapper
+++ b/scripts/wrapper/ld-wrapper
@@ -1,19 +1,8 @@
-#!/bin/sh
+#!/bin/bash
. ${PTXDIST_PLATFORMCONFIG}
+. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
-ARG_LIST=""
+add_ld_args
-if [ "${PTXCONF_TARGET_HARDEN_RELRO}" = "y" ]; then
- ARG_LIST+="-z relro "
-fi
-if [ "${PTXCONF_TARGET_HARDEN_BINDNOW}" = "y" ]; then
- ARG_LIST+="-z now "
-fi
-if [[ "${PTXCONF_TARGET_LINKER_GNUHASH}" = "y" ]]; then
- ARG_LIST+="--hash-style=gnu "
-fi
-
-#echo $0 $ARG_LIST "$@" >&2
-
-exec $0.real $ARG_LIST "$@"
+exec $0.real "${ARG_LIST[@]}" "$@"