From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test/T360-symbol-hiding: use readelf in place of nm
Date: Sun, 13 Dec 2020 08:58:22 -0400 [thread overview]
Message-ID: <873609j21d.fsf@tethera.net> (raw)
In-Reply-To: <m2a6uic17a.fsf@guru.guru-group.fi>
Tomi Ollila <tomi.ollila@iki.fi> writes:
> On Fri, Dec 11 2020, David Bremner wrote:
>
>> It turns out that using nm -P isn't as portable as hoped. In particular on
>> architectures using ELF v1 (e.g. ppc64), 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.
>
> Looks good. I use this opportunity to mention that `sort | uniq` can be
> replaced with `sort -u` :D
I actually did that, but then thought, there must be some reason we do
it this way, maybe portability? Having just checked, I see it's in POSIX
1003.1-2017 (and apparently earlier versions). So I guess it's most likely
safe.
Applied with s/sort|uniq/sort -u/ and one space deleted.
prev parent reply other threads:[~2020-12-13 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 17:17 [PATCH] test/T360-symbol-hiding: use readelf in place of nm David Bremner
2020-12-12 18:46 ` Tomi Ollila
2020-12-13 12:58 ` David Bremner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873609j21d.fsf@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).