Dne 7.8.2016 v 20:33 Jorge Natz napsal(a):
> -while (<>) {
> -  my $line = $_;
> -
> -  $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
> -
> -  print "*(.text.$1)\n"
[...]
> +     LINE=$( echo $LINE | sed -e s"/[0-9.][0-9.]*//" -e s"/[0-9.][0-9.]*$//" 
> | xargs)
> +     case $LINE in *unknown*|*total* ) continue
> +     ;;
> +     esac
> +     echo '*(.text.'$LINE')'
> +done

The two regular expressions are not equivalent and the shell version
does not take into account the locale-dependent decimal separator. It
also does not handle localized "total", but that's an issue of the perl
version as well. Since this script is not used during kernel build, its
dependency on perl is less of an issue and it can be left as is.

Michal

Reply via email to