[PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump.
David Bremner
david at tethera.net
Sat Jul 12 12:00:14 PDT 2014
Charles Celerier <cceleri at cs.stanford.edu> writes:
> David Bremner <david at tethera.net> writes:
>
> $ 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
Here is some equivalent output from Linux
$ objdump -t lib/*.o | sed -n '/[.]text.*notmuch/p' | tail -12
0000000000000150 g F .text 000000000000095e .hidden _notmuch_thread_create
0000000000000ab0 g F .text 0000000000000009 notmuch_thread_get_toplevel_messages
0000000000000ac0 g F .text 0000000000000009 notmuch_thread_get_messages
...
Notice in particular the ".hidden" in the first line. Also, the lack of
extra _ on the front.
It may be that the visibility information is not accessible on OS-X
using objdump; this is something different than whether a symbol is
extern. The symbols marked .hidden can be used across compilation unit
boundaries, but will not be exported from the shared library.
More information about the notmuch
mailing list