]> git.notmuchmail.org Git - notmuch/commit
test/T360-symbol-hiding: use readelf in place of nm
authorDavid Bremner <david@tethera.net>
Fri, 11 Dec 2020 17:06:44 +0000 (13:06 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 13 Dec 2020 12:23:42 +0000 (08:23 -0400)
commit82faa059b8c98a3af016778734be329557d4217d
treeff1efcccea5365275cffd4df70c79ae1672e70f9
parentc7e1910235d06dcb2e7931b187483fc2528ab714
test/T360-symbol-hiding: use readelf in place of nm

It turns out that using nm -P isn't as portable as hoped. In
particular with some ELF ABIs (e.g. ppc64 ELFv1), the desired symbols
end up in the data section instead of text.

The test is currently only functional on ELF based architectures, so I
think it's legit to depend on readelf instead of nm.

The switch to readelf has the advantage that we can explicitely ask
for all of the symbols with global visibility, rather than grepping
for notmuch. That seems a more robust approach since it will catch any
strangely named global symbols.
test/T360-symbol-hiding.sh