From: Alan Modra <amodra@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org, oliva@gnu.org
Subject: Re: [PATCH] elf: Strip unreferenced weak undefined symbols
Date: Fri, 19 Apr 2024 10:08:11 +0930 [thread overview]
Message-ID: <ZiG883JGpyd2qCUi@squeak.grove.modra.org> (raw)
In-Reply-To: <20240418122856.190234-1-hjl.tools@gmail.com>
On Thu, Apr 18, 2024 at 05:28:56AM -0700, H.J. Lu wrote:
> Linker will resolve an undefined symbol only if it is referenced by
> relocation. Unreferenced weak undefined symbols serve no purpose.
> Weak undefined symbols appear in the dynamic symbol table only when they
> are referenced by dynamic relocation. Mark symbols with relocation and
> strip undefined weak symbols if they don't have relocation and aren't
> in the dynamic symbol table.
OK, seems reasonable.
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2024-04-19 0:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 12:28 H.J. Lu
2024-04-19 0:38 ` Alan Modra [this message]
2024-04-19 7:15 ` Alan Modra
2024-04-22 5:50 ` Alexandre Oliva
2024-04-23 16:13 ` H.J. Lu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZiG883JGpyd2qCUi@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=oliva@gnu.org \
/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.
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).