| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | script_name="$(basenamescip-shell system . . basename. "$0")" |
| 6 | script_dir="$( |
| 7 | cd "$(dirnamescip-shell system . . dirname. "$0")" |
| 8 | echoscip-shell system . . echo. "${PWD}" |
| 9 | )" |
| 10 | |
| 11 | fatalscip-shell shell xen 4.20.2+37-g61ff35323e-1 fatal().() { |
| 12 | echoscip-shell system . . echo. "${script_name}: $*" >&2 |
| 13 | exit 1 |
| 14 | } |
| 15 | |
| 16 | arch="" |
| 17 | if [scip-shell system . . `[`. "${XEN_TARGET_ARCH}" == "x86_64" ]; then |
| 18 | arch=x86 |
| 19 | elif [scip-shell system . . `[`. "${XEN_TARGET_ARCH}" == "arm64" ]; then |
| 20 | arch=arm |
| 21 | else |
| 22 | fatalscip-shell shell xen 4.20.2+37-g61ff35323e-1 fatal(). "Unknown configuration: $1" |
| 23 | fi |
| 24 | |
| 25 | outfile=${script_dir}/linker_symbols.ecl |
| 26 | |
| 27 | ( |
| 28 | echoscip-shell system . . echo. -n "-decl_selector+={linker_symbols, \"^(" >"${outfile}" |
| 29 | "${script_dir}/../linker-symbols.sh" "${arch}" | sortscip-shell system . . sort. -u | trscip-shell system . . tr. '\n' '|' | sedscip-shell system . . sed. '$ s/|//' >>"${outfile}" |
| 30 | echoscip-shell system . . echo. -n ")$\"}" >>"${outfile}" |
| 31 | ) |