• 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
Missing(?) symbols in 'nm' output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing(?) symbols in 'nm' output


  • Subject: Missing(?) symbols in 'nm' output
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 29 Jan 2012 11:04:22 -0800

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


  • Follow-Ups:
    • Re: Missing(?) symbols in 'nm' output
      • From: Nick Blievers <email@hidden>
    • Re: Missing(?) symbols in 'nm' output
      • From: Jeff Johnson <email@hidden>
  • Prev by Date: Team member refresh not allowed
  • Next by Date: Re: Missing(?) symbols in 'nm' output
  • Previous by thread: Team member refresh not allowed
  • Next by thread: Re: Missing(?) symbols in 'nm' output
  • Index(es):
    • Date
    • Thread