summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 22:55:10 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 22:55:10 (EDT)
commitc976f35eeda766582f588fdc7a90b907442ac7ed (patch)
tree8f48c930d99bae14e70b6deea15009fa4ea38a20 /tools
parentd666e8b8c7a6a899b10e861ddcd678ca2dafe324 (diff)
tools/shld.sh: Move DT_NEEDED and RTLD below input files
Otherwise, LIBDATADIR isn't defined and library loading fails.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/shld.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/shld.sh b/tools/shld.sh
index d53dab3..0b3bfe7 100755
--- a/tools/shld.sh
+++ b/tools/shld.sh
@@ -59,6 +59,13 @@ link()
}
EOF
+ # Read input files.
+ for input in "${@}"; do
+ if ! cat "${input}" >&3; then
+ die 'Cannot read file "%s"' "${input}"
+ fi
+ done
+
# Write __DT_NEEDED list and basic RTLD.
printf "__DT_NEEDED='%s'\n" "${libs}" >&3
cat >&3 <<-'EOF'
@@ -86,13 +93,6 @@ link()
unset __lib __el __found __f
EOF
- # Read input files.
- for input in "${@}"; do
- if ! cat "${input}" >&3; then
- die 'Cannot read file "%s"' "${input}"
- fi
- done
-
# Add call to init functions.
cat >&3 <<-'EOF'
unset IFS