This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold's script_test_4
- From: Ian Lance Taylor <iant at google dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: binutils at sourceware dot org
- Date: Mon, 18 Aug 2008 09:31:01 -0700
- Subject: Re: gold's script_test_4
- References: <20080817.211641.168947502.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> This fails on sparc 32-bit because the regexp is expecting leading
> zeros but the address is 32-bits and therefore there is no
> reason for readelf to output leading zeros for the .interp
> section Addr field.
>
> [ 1] .interp PROGBITS 10000400 000400 000013 00 A 0 0 1
As far as I can see the regexp doesn't expect leading zeroes. The
regexp in script_test_4.sh is
\\.interp[ ]*PROGBITS[ ]*0*10000400
The 0* should permit leading zeroes without requiring them.
Your output works on my system:
> echo ' [ 1] .interp PROGBITS 10000400 000400 000013 00 A 0 0 1' | grep "\\.interp[ ]*PROGBITS[ ]*0*10000400"
[ 1] .interp PROGBITS 10000400 000400 000013 00 A 0 0 1
So this may be a difference in grep, although the '*' operator is
supposed to be part of basic regular expressions, and should be
supported by grep. Would it work on your system to change to use
egrep instead?
Ian