michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone
20850a
diff -up rpm-4.11.1/scripts/find-debuginfo.sh.minidebug-ppc64 rpm-4.11.1/scripts/find-debuginfo.sh
20850a
--- rpm-4.11.1/scripts/find-debuginfo.sh.minidebug-ppc64	2014-01-16 14:05:17.291955782 +0200
20850a
+++ rpm-4.11.1/scripts/find-debuginfo.sh	2014-01-16 14:05:56.437285842 +0200
20850a
@@ -149,7 +149,10 @@ add_minidebug()
20850a
   # in the normal symbol table
20850a
   nm -D "$binary" --format=posix --defined-only | awk '{ print $1 }' | sort > "$dynsyms"
20850a
   # Extract all the text (i.e. function) symbols from the debuginfo 
20850a
-  nm "$debuginfo" --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t") print $1 }' | sort > "$funcsyms"
20850a
+  # Use format sysv to make sure we can match against the actual ELF FUNC
20850a
+  # symbol type. The binutils nm posix format symbol type chars are
20850a
+  # ambigous for architectures that might use function descriptors.
20850a
+  nm "$debuginfo" --format=sysv --defined-only | awk -F \| '{ if ($4 ~ "FUNC") print $1 }' | sort > "$funcsyms"
20850a
   # Keep all the function symbols not already in the dynamic symbol table
20850a
   comm -13 "$dynsyms" "$funcsyms" > "$keep_symbols"
20850a
   # Copy the full debuginfo, keeping only a minumal set of symbols and removing some unnecessary sections