[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] automation: add linker symbol name script



commit 0e0426dda4bcc67826a575822538583e8f5b7cfc
Author:     Victor Lira <victorm.lira@xxxxxxx>
AuthorDate: Thu Jul 25 12:01:53 2024 -0700
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Wed Aug 28 17:47:40 2024 -0700

    automation: add linker symbol name script
    
    Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 automation/eclair_analysis/linker-symbols.sh | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/automation/eclair_analysis/linker-symbols.sh 
b/automation/eclair_analysis/linker-symbols.sh
new file mode 100755
index 0000000000..0f49aed88c
--- /dev/null
+++ b/automation/eclair_analysis/linker-symbols.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Stop immediately if any executed command has exit status different from 0.
+set -e
+
+# Extract linker symbol names (except those starting with ".") from 
assignments.
+
+script_name=$(basename "$0")
+script_dir="$(
+  cd "$(dirname "$0")"
+  echo "${PWD}"
+)"
+src_dir="${script_dir}/../.."
+
+fatal() {
+  echo "${script_name}: $*" >&2
+  exit 1
+}
+
+usage() {
+  fatal "Usage: ${script_name} <arch>"
+}
+
+if [ $# -ne 1 ]; then
+  usage
+fi
+
+filepath="${src_dir}/xen/arch/${1}/xen.lds"
+
+if [ ! -f "$filepath" ]; then
+  fatal "Could not find ${1} linker script. Must be run after the build."
+fi
+
+sed -n "s/^\s*\([a-zA-Z_][a-zA-Z_0-9.\-]*\)\s*=.*;.*$/\1/p" "$filepath"
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.