[PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump.

Charles Celerier cceleri at cs.stanford.edu
Sat May 10 07:55:43 PDT 2014


David Bremner <david at tethera.net> writes:

> Charles Celerier <cceleri at cs.stanford.edu> writes:
>
>> At this point, I'm not sure how to create a better version of this
>> patch. Are we renaming functions in notmuch-private.h? Should we stick
>> with objdump or switch to using nm?
>
> I'd go with renaming any functions that start with notmuch to start with
> _notmuch.

Ok. Should I pull the patch from
id:1399402716-13714-1-git-send-email-cceleri at cs.stanford.edu into this
patch series?

> Since it seems neither nm nor objdump provides uniform output between
> OS/X and Linux, there isn't an obvious advantage to switching to nm. Any
> idea if objdump can be made to work (in this test) on OS/X ?

I can install GNU objdump on OS/X, but the problem seems to be that
objdump changes its output depending on the object file format (see -t
option documentation in objdump(1)). What does the output of nm look
like for you? Is really that different? Here is what my objdump output
looks like:

    $ objdump -t lib/*.o | sed -n '/\[\.text\] __\?notmuch/p' | tail
    00000000000009a0 g       0f SECT   01 0000 [.text] _notmuch_thread_get_authors
    0000000000000990 g       0f SECT   01 0000 [.text] _notmuch_thread_get_matched_messages
    0000000000000960 g       0f SECT   01 0000 [.text] _notmuch_thread_get_messages
    00000000000009d0 g       0f SECT   01 0000 [.text] _notmuch_thread_get_newest_date
    00000000000009c0 g       0f SECT   01 0000 [.text] _notmuch_thread_get_oldest_date
    00000000000009b0 g       0f SECT   01 0000 [.text] _notmuch_thread_get_subject
    00000000000009e0 g       0f SECT   01 0000 [.text] _notmuch_thread_get_tags
    0000000000000970 g       0f SECT   01 0000 [.text] _notmuch_thread_get_thread_id
    0000000000000950 g       0f SECT   01 0000 [.text] _notmuch_thread_get_toplevel_messages
    0000000000000980 g       0f SECT   01 0000 [.text] _notmuch_thread_get_total_messages

I suppose we could just account for the difference in output of objdump
on OS/X, but I was hoping that the output of nm would be more consistent
since its a simpler program.

chuck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140510/4f22a64f/attachment-0001.pgp>


More information about the notmuch mailing list