Changeset 12d861f in freewrt


Ignore:
Timestamp:
May 23, 2007, 1:58:20 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
6bace344
Parents:
1516dda
Message:

scan for statically linked executables too

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2625 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/rstrip.sh

    r1516dda r12d861f  
    2323
    2424find $TARGETS -type f -a -exec file {} \; | \
    25     sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*, not stripped/\1:\2/p' |
    26     while IFS=: read F S; do
     25    while IFS= read -r line; do
     26        F=${line%%:*}
     27        V=${F##*/fake-+([!/])/}
    2728        T="${prefix}strip -R .comment"
    28         if [[ $F = */lib/modules/2.*.@(o|ko) ]]; then
    29                 S="kernel module $S"
     29        case $line in
     30        *ELF*executable*statically\ linked*)
     31                echo >&2 "$SELF: *WARNING* '$V' is not dynamically linked!"
     32                ;;
     33        esac
     34        case $line in
     35        *ELF*executable*,\ not\ stripped*)
     36                S=executable ;;
     37        */lib/modules/2.*.o:*ELF*relocatable*,\ not\ stripped* | \
     38        */lib/modules/2.*.ko:*ELF*relocatable*,\ not\ stripped*)
    3039                # kernel module parametres must not be stripped off
    3140                T="$T --strip-unneeded $(echo $(${prefix}nm $F | \
    3241                    sed -n -e '/__param_/s/^.*__param_/-K /p' \
    3342                    -e '/__module_parm_/s/^.*__module_parm_/-K /p'))"
    34         fi
    35         echo "$SELF: $F:$S"
    36         # The following line intentionally left in to prove
    37         # to n0-1@ that I do test my changes… yes it works.
    38         #echo "D: $T $F"
     43                S='kernel module' ;;
     44        *ELF*relocatable*,\ not\ stripped*)
     45                S=relocatable ;;
     46        *ELF*shared\ object*,\ not\ stripped*)
     47                S='shared object' ;;
     48        *)
     49                continue ;;
     50        esac
     51        echo "$SELF: $V:$S"
    3952        eval "$T $F"
    4053done
Note: See TracChangeset for help on using the changeset viewer.