This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libstdc++]: Fix scripts/extract_symvers to remove extra [<other>: xx] field


* Uros Bizjak wrote on Mon, Jan 12, 2009 at 09:07:32AM CET:
> 2009-01-12  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* scripts/extract_symvers: Add sed script to remove ' [<other>: xx] '
> 	field from readelf output.

> --- extract_symvers	(r??vision 143247)
> +++ extract_symvers	(copie de travail)
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  
> -# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
> +# Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
>  #
>  # This file is part of the GNU ISO C++ Library.  This library is free
>  # software; you can redistribute it and/or modify it under the
> @@ -52,7 +52,9 @@
>  
>  tmp=extract.$$
>  
> -${readelf} ${lib} | sed '/\.dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' |\
> +${readelf} ${lib} |\
> +sed -e 's/ [<other>: [A-Fa-f0-9]*] //' -e '/\.dynsym/,/^$/p;d' |\

The brackets that are supposed to match literally, need escaping with a
backslash.

> +egrep -v ' (LOCAL|UND) ' |\

I wonder if egrep needs factoring into $EGREP (egrep vs. grep -E).

>  awk '{ if ($4 == "FUNC" || $4 == "NOTYPE")
>           printf "%s:%s\n", $4, $8;
>         else if ($4 == "OBJECT")

Cheers,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]