This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: gold's script_test_4


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


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