public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RE: objdump --syms -j .text
@ 2005-04-01  9:23 Andy Chittenden
  2005-04-01  9:59 ` Dave Korn
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Chittenden @ 2005-04-01  9:23 UTC (permalink / raw)
  To: Dave Korn, Pieter Arnout; +Cc: binutils

At the moment we do use grep. The reason why I'd prefer not to use grep
is for performance: we process the output using perl and have to throw
away two-thirds of the output of the objdump. Thanks for the suggestion
to use objcopy: on the elf file in question, it is quicker to use
objcopy and then use objdump to dump the symbols than do a grep:

with objdump/grep:
real    0m4.347s
user    0m4.134s
sys     0m0.207s

with objcopy/objdump:
real    0m2.632s
user    0m2.341s
sys     0m0.287s

It would be great if we didn't have to do that objcopy as well (ie for
objdump to take note of the -j .text option when dumping symbols).
-- 
Andy, BlueArc Engineering

-----Original Message-----
From: Dave Korn [mailto:dave.korn@artimi.com] 
Sent: 31 March 2005 18:39
To: 'Pieter Arnout'; Andy Chittenden
Cc: binutils@sources.redhat.com
Subject: RE: objdump --syms -j .text

----Original Message----
>From: Pieter Arnout
>Sent: 31 March 2005 18:28

> Forgive me for asking, but why don't you just grep out the .text
symbols
> from a normal objdump? Is it because you still need the object file
> format?  
> 
> If not, you could do something like this:
> 
> objdump -x <infile> | grep ".text" > <tempfile>
> 


  .... although of course '.' is a regex metachar meaning 'any
character',
and there's nothing that says that won't match symbol names etc, because
it's not really doing any checking to be sure the match is occurring on
the
symbol-section field of the objdump output.....

  I do agree it's a reasonable first approximation, but splitting out
the
.text section and objdumping that without grep is just as easy, and even
more correct.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 11+ messages in thread
* objdump --syms -j .text
@ 2005-03-31 15:58 Andy Chittenden
  2005-03-31 21:06 ` Dave Korn
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Chittenden @ 2005-03-31 15:58 UTC (permalink / raw)
  To: binutils

I want to dump out just the symbols in the .text section. Is that
possible? The "obvious" invocation of using "-j .text --syms" seems to
ignore the -j option and dumps the symbols for all sections.

-- 
Andy, BlueArc Engineering 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-04 14:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-01  9:23 objdump --syms -j .text Andy Chittenden
2005-04-01  9:59 ` Dave Korn
2005-04-04  0:50   ` Alan Modra
2005-04-04  9:07     ` Dave Korn
2005-04-04 10:06     ` [PATCH] PR 813 (was Re: objdump --syms -j .text ) Ramana Radhakrishnan
2005-04-04 10:35       ` Nick Clifton
2005-04-04 10:40         ` Ramana Radhakrishnan
2005-04-04 13:24         ` Daniel Jacobowitz
2005-04-04 14:45           ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2005-03-31 15:58 objdump --syms -j .text Andy Chittenden
2005-03-31 21:06 ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).