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]

Re: Fix the object file grepping, take two


On Fri, Mar 16, 2001 at 05:14:06PM -0600, Raja R Harinath wrote:
> Hi,
> 
> "Zack Weinberg" <zackw@Stanford.EDU> writes:
> > On Thu, Mar 15, 2001 at 10:24:14PM -0800, Zack Weinberg wrote:
> > > Once again - I'd appreciate if people with systems where grep cannot
> > > handle binary files, would try this patch.  It uses a lengthy bit of
> > > plumbing to convert the object file into text, which can be grepped
> > > safely.  I factored out the common logic into a utility macro.  The
> > > fix for little-endian ARM is still included.
> > 
> > I applied this patch, with Alexandre's suggestion of adding a sed
> > operation instead of using cut.  People haven't told me of any
> > showstopper problems, and it can't be worse than the current
> > situation.
> 
> This fails for me on i686-pc-linux-gnu, with a recent gcc mainline
> snapshot as the stage1 compiler.
> 
> I've attached the conftest.o and conftest.dmp files.  Notice the extra
> newline (probably introduced by 'fold') inside the string of interest.

I think this is the same bug RTH reported earlier, where the sed
script fails to detect \n markers at the beginning of the line.

$ od -c conftest.o 
0000000 177   E   L   F 001 001 001  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020 001  \0 003  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   <  \a  \0  \0  \0  \0  \0  \0   4  \0  \0  \0  \0  \0   (  \0
0000060  \f  \0  \t  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \n   f   o   r   m   a   t   :   P   F   E   E   E   I   @   @
0000120   :   t   a   m   r   o   f  \n  \n   f   o   r   m   a   t   :

zw


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