4 tmp
=$
(mktemp
${objpfx}tst-xmmymm.XXXXXX
)
5 trap 'rm -f "$tmp"' 1 2 3 15
7 # List of object files we have to test
8 rtldobjs
=$
(readelf
-W -wi ${objpfx}dl-allobjs.os |
9 awk '/^ </ { if ($5 == "(DW_TAG_compile_unit)") c=1; else c=0 } $2 == "DW_AT_name" { if (c == 1) print $NF }' |
10 sed 's,\(.*/\|\)\([_[:alnum:]-]*[.]\).$,\2os,')
11 rtldobjs
="$rtldobjs $(ar t ${objpfx}rtld-libc.a)"
13 # OBJECT symbols can be ignored.
14 readelf
-sW ${objpfx}dl-allobjs.os
${objpfx}rtld-libc.a |
15 egrep " OBJECT *GLOBAL " |
16 awk '{if ($7 != "ABS") print $8 }' |
19 objects
=($
(cat "$tmp"))
22 tocheck
="dl-runtime.os"
24 while test -n "$objs"; do
29 undef
=$
(nm
-u "$objpfx"..
/*/"$f" |
awk '{print $2}')
30 if test -n "$undef"; then
32 for obj
in ${objects[*]} "_GLOBAL_OFFSET_TABLE_"; do
33 if test "$obj" = "$s"; then
37 for o
in $rtldobjs; do
38 ro
=$
(echo "$objpfx"..
/*/"$o")
39 if nm
-g --defined-only "$ro" |
egrep -qs " $s\$"; then
40 if ! (echo "$tocheck $objs" | fgrep
-qs "$o"); then
41 echo "$o needed for $s"
50 tocheck
="$tocheck$objs"
55 echo "object files needed: $tocheck"
59 objdump
-d "$objpfx"..
/*/"$f" |
60 awk 'BEGIN { last="" } /^[[:xdigit:]]* <[_[:alnum:]]*>:$/ { fct=substr($2, 2, length($2)-3) } /,%[xy]mm[[:digit:]]*$/ { if (last != fct) { print fct; last=fct} }' |
62 if test "$fct" = "_dl_runtime_profile" -o "$fct" = "_dl_x86_64_restore_sse"; then
65 echo "function $fct in $f modifies xmm/ymm" >> "$tmp"
70 if test -s "$tmp"; then