mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 19:53:32 +08:00
Use configured $(NM), $(OBJDUMP), $(READELF) in tst-xmmymm.sh.
This commit is contained in:
parent
eb48db7e89
commit
0fbb0fbc2e
@ -1,3 +1,12 @@
|
||||
2012-11-07 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Pass $(NM),
|
||||
$(OBJDUMP) and $(READELF) to tst-xmmymm.sh.
|
||||
* sysdeps/x86/tst-xmmymm.sh (NM): New variable. Use it instead of
|
||||
hardcoded "nm".
|
||||
(OBJDUMP): New variable. Use it instead of hardcoded "objdump".
|
||||
(READELF): New variable. Use it instead of hardcoded "readelf".
|
||||
|
||||
2012-11-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86_64/Makefile ($(objpfx)tst-xmmymm.out): Moved to ...
|
||||
|
@ -5,5 +5,5 @@ CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
|
||||
tests: $(objpfx)tst-xmmymm.out
|
||||
$(objpfx)tst-xmmymm.out: ../sysdeps/x86/tst-xmmymm.sh $(objpfx)ld.so
|
||||
@echo "Checking ld.so for SSE register use. This will take a few seconds..."
|
||||
$(SHELL) $< $(objpfx) > $@
|
||||
$(SHELL) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@
|
||||
endif
|
||||
|
@ -20,18 +20,21 @@
|
||||
set -e
|
||||
|
||||
objpfx="$1"
|
||||
NM="$2"
|
||||
OBJDUMP="$3"
|
||||
READELF="$4"
|
||||
|
||||
tmp=$(mktemp ${objpfx}tst-xmmymm.XXXXXX)
|
||||
trap 'rm -f "$tmp"' 1 2 3 15
|
||||
|
||||
# List of object files we have to test
|
||||
rtldobjs=$(readelf -W -wi ${objpfx}dl-allobjs.os |
|
||||
rtldobjs=$($READELF -W -wi ${objpfx}dl-allobjs.os |
|
||||
awk '/^ </ { if ($5 == "(DW_TAG_compile_unit)") c=1; else c=0 } $2 == "DW_AT_name" { if (c == 1) print $NF }' |
|
||||
sed 's,\(.*/\|\)\([_[:alnum:]-]*[.]\).$,\2os,')
|
||||
rtldobjs="$rtldobjs $(ar t ${objpfx}rtld-libc.a)"
|
||||
|
||||
# OBJECT symbols can be ignored.
|
||||
readelf -sW ${objpfx}dl-allobjs.os ${objpfx}rtld-libc.a |
|
||||
$READELF -sW ${objpfx}dl-allobjs.os ${objpfx}rtld-libc.a |
|
||||
egrep " OBJECT *GLOBAL " |
|
||||
awk '{if ($7 != "ABS") print $8 }' |
|
||||
sort -u > "$tmp"
|
||||
@ -46,7 +49,7 @@ while test -n "$objs"; do
|
||||
objs=""
|
||||
|
||||
for f in $this; do
|
||||
undef=$(nm -u "$objpfx"../*/"$f" | awk '{print $2}')
|
||||
undef=$($NM -u "$objpfx"../*/"$f" | awk '{print $2}')
|
||||
if test -n "$undef"; then
|
||||
for s in $undef; do
|
||||
for obj in ${objects[*]} "_GLOBAL_OFFSET_TABLE_"; do
|
||||
@ -56,7 +59,7 @@ while test -n "$objs"; do
|
||||
done
|
||||
for o in $rtldobjs; do
|
||||
ro=$(echo "$objpfx"../*/"$o")
|
||||
if nm -g --defined-only "$ro" | egrep -qs " $s\$"; then
|
||||
if $NM -g --defined-only "$ro" | egrep -qs " $s\$"; then
|
||||
if ! (echo "$tocheck $objs" | fgrep -qs "$o"); then
|
||||
echo "$o needed for $s"
|
||||
objs="$objs $o"
|
||||
@ -76,7 +79,7 @@ echo "object files needed: $tocheck"
|
||||
|
||||
cp /dev/null "$tmp"
|
||||
for f in $tocheck; do
|
||||
objdump -d "$objpfx"../*/"$f" |
|
||||
$OBJDUMP -d "$objpfx"../*/"$f" |
|
||||
awk 'BEGIN { last="" } /^[[:xdigit:]]* <[_[:alnum:]]*>:$/ { fct=substr($2, 2, length($2)-3) } /,%[xy]mm[[:digit:]]*$/ { if (last != fct) { print fct; last=fct} }' |
|
||||
while read fct; do
|
||||
if test "$fct" = "_dl_runtime_profile" -o "$fct" = "_dl_x86_64_restore_sse"; then
|
||||
|
Loading…
Reference in New Issue
Block a user