[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57A7972D.7070206@suse.com>
Date: Sun, 7 Aug 2016 22:16:45 +0200
From: Michal Marek <mmarek@...e.com>
To: Jorge Natz <jorgenatzdev@...il.com>, arjan@...ux.intel.com
Cc: linux-kernel@...r.kernel.org, trivial@...nel.org
Subject: Re: [PATCH] scripts: Translate profile2linkerlist.
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
Powered by blists - more mailing lists