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


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.

conftest.o

177ELF............001...............<.......4.....(.\f...............\nformat:PF
EEEI@@:tamrof
format:214......C:tamrof
\nformat:1Z@...#<:tamrof
format:224.V.R..B:tamrof
\nformat:.....Z(.:tamrof
........\b...........01.01...............\f...d.......?...d.......J...<...\0...Y
...........203...............200...............\0...............A...............
200...............\0...............=...........g...200...............\0.........
......305...............200...............\0...B...........g...............200..
.............\0...............\0...............200.......m.....
\0.......d.......\0conftest.c./home/grad04/harinath/gnu/src/gcc/build/linux/gcc/
.conftest.c.gcc2_compiled..int:t(0,1)=r(0,1);-2147483648;2147483647;.char:t(0,2)
=r(0,2);0;127;.longint:t(0,3)=r(0,3);-2147483648;2147483647;.unsignedint:t(0,4)=
r(0,4);0000000000000;0037777777777;.longunsignedint:t(0,5)=r(0,5);0000000000000;
0037777777777;\0longlongint:t(0,6)=@s64;r(0,6);01000000000000000000000;077777777
7777777777777;.longlongunsignedint:t(0,7)=@s64;r(0,7);0000000000000;017777777777
77777777777;.shortint:t(0,8)=@s16;r(0,8);-32768;32767;.shortunsignedint:t(0,9)=@
s16;r(0,9);0;65535;.signedchar:t(0,10)=@s8;r(0,10);-128;127;.unsignedchar:t(0,11
)=@s8;r(0,11);0;255;.float:t(0,12)=r(0,1);4;0;.double:t(0,13)=r(0,1);8;0;.longdo
uble:t(0,14)=r(0,1);12;0;.complexint:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;
;.complexfloat:t(0,16)=r(0,16);8;0;.complexdouble:t(0,17)=r(0,17);16;0;.complexl
ongdouble:t(0,18)=r(0,18);24;0;\0__builtin_va_list:t(0,19)=.(0,20)=(0,20)._Bool:
t(0,21)=@s8;-16;\0confdefs.h.possibility:T(0,22)=s24prefix:(0,23)=ar(0,24)=r(0,2
4);0000000000000;0037777777777;;0;7;(0,2),0,64;candidate:(0,13),64,64;postfix:(0
,23),128,64;;.table:G(0,25)=ar(0,24);0;4;(0,22)..GCC:(GNU)3.120010314(experiment
al)...symtab..strtab..shstrtab..text..data..bss..note..stab..rel.stab..stabstr..
comment......\0................\0...............\0...4...........\0...........!.
..001...........@...200..............\0...'...........\0...............\0.......
....,...\a...............024...............\0...2...........\0..............\0..
.........8...\t...............030...
...........\b...B...........\0...0...........\0...........K...001...............
(...............\0...............\0.......T.......\0...............002..........
.....240...............020...............\0...............\0...............\0...
............\0...............\0...............\0...............\0...............
\0...............\0...............\0...............\0...............\0...x......
..conftest.c.table...024..............X.......

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

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