public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Jorge Natz <jorgenatzdev@gmail.com>, arjan@linux.intel.com
Cc: linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: Re: [PATCH] scripts: Translate profile2linkerlist.
Date: Sun, 7 Aug 2016 22:16:45 +0200	[thread overview]
Message-ID: <57A7972D.7070206@suse.com> (raw)
In-Reply-To: <57A77EF6.5030200@gmail.com>

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	other threads:[~2016-08-07 20:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-07 18:33 [PATCH] scripts: Translate profile2linkerlist Jorge Natz
2016-08-07 20:16 ` Michal Marek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57A7972D.7070206@suse.com \
    --to=mmarek@suse.com \
    --cc=arjan@linux.intel.com \
    --cc=jorgenatzdev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox