gold's script_test_4
Ian Lance Taylor
iant@google.com
Mon Aug 18 16:32:00 GMT 2008
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
More information about the Binutils
mailing list