This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libstdc++]: Fix scripts/extract_symvers to remove extra [<other>: xx] field
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Jan 2009 08:58:46 +0100
- Subject: Re: [PATCH, libstdc++]: Fix scripts/extract_symvers to remove extra [<other>: xx] field
- References: <5787cf470901120007q1ef924fcgcb9753eef2b3138a@mail.gmail.com>
* 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