• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing(?) symbols in 'nm' output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing(?) symbols in 'nm' output


  • Subject: Re: Missing(?) symbols in 'nm' output
  • From: Jeff Johnson <email@hidden>
  • Date: Sun, 29 Jan 2012 14:20:55 -0600

otool -l gives the address and size of each section, so you can use that to calculate where the section ends. It may be the __cstring section after __text.

-Jeff


On Jan 29, 2012, at 1:04 PM, Jens Alfke wrote:

> As I mentioned in a previous thread, I’m trying to figure out the size of the various functions/methods/data in a Mach-O binary. Yesterday I wrote a simple Ruby script that postprocesses the output of “nm -n” to subtract the addresses of adjacent symbols to determine their sizes.
>
> Mostly this works fine, but a few symbols show up as much too large. For example, in this instance _MYAfterDelay is a simple function that should occupy maybe a hundred bytes, but from the ‘nm’ output it looks like its size is 38601 bytes:
>> ...
>> 000000000001fd89 t -[NSObject(MYBlockUtils) my_run_as_block]
>> 000000000001fd97 t _MYAfterDelay
>> 0000000000029460 s _kDefaultTDChangesOptions
>> 0000000000029488 s _kDefaultTDQueryOptions
>
>
> Presumably there is something else occupying most of that intervening space, but ‘nm’ doesn’t tell me what it is. This may have something to do with the fact that _MYAfterDelay is the last symbol in the TEXT section, according to the output (since it’s sorted by address.)
>
> Anyone have enough understanding of the Mach-O format to know what might be going on? I’ve tried other options to ‘nm’ but didn’t find anything that showed me any other symbols in that gap.
>
> —Jens


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Missing(?) symbols in 'nm' output (From: Jens Alfke <email@hidden>)

  • Prev by Date: Missing(?) symbols in 'nm' output
  • Next by Date: Re: Missing(?) symbols in 'nm' output
  • Previous by thread: Missing(?) symbols in 'nm' output
  • Next by thread: Re: Missing(?) symbols in 'nm' output
  • Index(es):
    • Date
    • Thread