scripts/xldd: fix pattern matching with new binutils
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Thu Aug 02 21:38:41 2012 +0200 (2012-08-02)
changeset 3025d25fb5bf6615
parent 3024 567565640fbe
child 3026 8b914f5ce90d
scripts/xldd: fix pattern matching with new binutils

New binutils (circa 2.2x?) append 'program interpreter' to the
(NEEDED) line for the dynamic linker, which breaks our current
pattern.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/xldd.in
     1.1 --- a/scripts/xldd.in	Wed Aug 01 19:07:37 2012 +0200
     1.2 +++ b/scripts/xldd.in	Thu Aug 02 21:38:41 2012 +0200
     1.3 @@ -270,9 +270,9 @@
     1.4      done
     1.5      do_trace ": end search path"
     1.6  
     1.7 -    for n in $( "${readelf}" -d "${file}"                                           \
     1.8 -                |"${grep}" -E '\(NEEDED\)'                                          \
     1.9 -                |"${sed}" -r -e 's/^.*Shared library:[[:space:]]+\[(.*)\]$/\1/;'    \
    1.10 +    for n in $( "${readelf}" -d "${file}"                                               \
    1.11 +                |"${grep}" -E '\(NEEDED\)'                                              \
    1.12 +                |"${sed}" -r -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;'    \
    1.13                ); do
    1.14          found=0
    1.15          for m in "${needed_list[@]}"; do