From c976f35eeda766582f588fdc7a90b907442ac7ed Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 18 Mar 2019 22:55:10 -0400 Subject: tools/shld.sh: Move DT_NEEDED and RTLD below input files Otherwise, LIBDATADIR isn't defined and library loading fails. --- (limited to 'tools') 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 -- cgit v0.9.1