From: Alexandre Oliva <oliva@adacore.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: avoiding undesirable undef[weak] syms after relocatable linking
Date: Tue, 16 Apr 2024 03:00:09 -0300 [thread overview]
Message-ID: <ory19dc0eu.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <CAMe9rOpDdJqf78PMR--+6NsnKgPEkafYeCUYnhVDvjj86iyz2Q@mail.gmail.com> (H. J. Lu's message of "Sat, 13 Apr 2024 06:52:31 -0700")
Hello, H.J.,
On Apr 13, 2024, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>> $ gas/as-new t.s -o t.o && binutils/ar cr t.a t.o && binutils/ranlib
>> t.a && gas/as-new m.s -o m.o && ld/ld-new m.o t.a -o m -r &&
>> binutils/nm-new m | grep bar
>> w bar
>> $ ld/ld-new --version
>> GNU ld (GNU Binutils) 2.42.50.20240413
>> [...]
>> $ git log
>> commit 4ad25f3bed6bc4c010962b11fde1c70ce8c22cae
>> [...]
> Please open a bug report.
Can do (and thanks for the patch), but... Are you positive that that's
a bug to begin with?
I am concerned that changing it might break something, though I can't
quite put my finger on what it is that might break with this change.
Say, given another object file, say x.o, to be final-linked with the
result of the relocatable link that this patch would change, couldn't a
symbol that resolved to the undefweak become a final link failure after
the change? Or if the relocatable link output was made part of a
dynamic library, couldn't something break in case the undefweak symbol
was meant to be dynamically exported, but would now be entirely gone?
That's why I was thinking of controlling this behavior change with an
option.
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive
next prev parent reply other threads:[~2024-04-16 6:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 15:38 Alexandre Oliva
2024-04-12 9:01 ` Nick Clifton
2024-04-13 10:15 ` Alexandre Oliva
2024-04-13 13:52 ` H.J. Lu
2024-04-13 14:46 ` H.J. Lu
2024-04-16 6:00 ` Alexandre Oliva [this message]
2024-04-16 11:55 ` H.J. Lu
2024-04-18 7:43 ` Alexandre Oliva
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=ory19dc0eu.fsf@lxoliva.fsfla.org \
--to=oliva@adacore.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=nickc@redhat.com \
/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).