Changeset 12d861f in freewrt
- Timestamp:
- May 23, 2007, 1:58:20 PM (19 years ago)
- Children:
- 6bace344
- Parents:
- 1516dda
- File:
-
- 1 edited
-
scripts/rstrip.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
scripts/rstrip.sh
r1516dda r12d861f 23 23 24 24 find $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-+([!/])/} 27 28 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*) 30 39 # kernel module parametres must not be stripped off 31 40 T="$T --strip-unneeded $(echo $(${prefix}nm $F | \ 32 41 sed -n -e '/__param_/s/^.*__param_/-K /p' \ 33 42 -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" 39 52 eval "$T $F" 40 53 done
Note:
See TracChangeset
for help on using the changeset viewer.
