public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH v2] elf: Implement filtering of symbols historically defined in libpthread
Date: Thu, 6 May 2021 09:58:26 -0300	[thread overview]
Message-ID: <0f1a1f66-fbcf-8ece-6c35-5953560c5f17@linaro.org> (raw)
In-Reply-To: <87wnscgh5f.fsf@oldenburg.str.redhat.com>



On 06/05/2021 09:50, Florian Weimer via Libc-alpha wrote:
> * H. J. Lu:
> 
>> On Thu, May 6, 2021 at 2:17 AM Florian Weimer <fweimer@redhat.com> wrote:
>>>
>>> * H. J. Lu:
>>>
>>>> On Wed, May 5, 2021 at 1:48 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>>
>>>>> On Wed, May 5, 2021 at 1:17 PM Florian Weimer via Libc-alpha
>>>>> <libc-alpha@sourceware.org> wrote:
>>>>>>
>>>>>> * Andreas Schwab:
>>>>>>
>>>>>>> When bison is rebuilt with a linker that contains binutils commit
>>>>>>> b293661219c, it no longer crashes, and this patch isn't needed.
>>>>>>
>>>>>> Hmm.  I worry we need to preserve compatibility with old binaries.  Not
>>>>>> everyone can do distribution bootstrap or has the source code to carry
>>>>>> it out.
>>>>>
>>>>> We never guarantee that applications linked against the old unversion
>>>>> glibc work with the versioned glibc today.  Otherwise, we don't need
>>>>> glibc version at all.
>>>>
>>>> We can hide symbols for undefined, weak, unversioned references
>>>> from the old versioned binaries.
>>>
>>> If it's okay to deliberately break backwards compatibility with some old
>>> binaries, wouldn't we not use a patch at all?  That's drop this patch
>>> and just use what's currently in the tree?
>>>
>>> I'm not sure which group of old binaries is more important (deliberate
>>> use of unversioned weak symbols in recent times vs binaries linked
>>> against glibc 2.0 using the accidentally).  If it's okay to break
>>> things, I'm leaning towards “no patch” (despite having spent quite some
>>> time on it).
>>
>> We should maintain backward compatibility with versioned binaries.   For
>> unversioned binaries, we can check DT_NEEDED with libpthread.so.6.
> 
> No, entirely unversioned binaries would break without per-symbol
> treatment, see the symbol table I posted.  Looking for libpthread.so.6
> won't fix that.


But is the gcc-2.7.2.3 you referred failing to run on master without the
symbol filtering?

And did we have historically libpthread support for libc without symbols 
versioning? 

Because my view is this symbol filtering hack is required to fix this
specific ABI abuse that developers used to check if the process is 
multi-thread. Is there any other case we are aiming to keep backward 
support?


  reply	other threads:[~2021-05-06 12:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 13:44 Florian Weimer
2021-05-05 14:10 ` Adhemerval Zanella
2021-05-05 15:30   ` Florian Weimer
2021-05-05 15:53   ` H.J. Lu
2021-05-05 16:01     ` Florian Weimer
2021-05-05 16:55       ` Adhemerval Zanella
2021-05-05 17:19         ` Florian Weimer
2021-05-05 17:52           ` H.J. Lu
2021-05-05 17:56             ` Florian Weimer
2021-05-05 18:06           ` Adhemerval Zanella
2021-05-05 18:16             ` Florian Weimer
2021-05-05 18:18               ` H.J. Lu
2021-05-05 18:28                 ` Florian Weimer
2021-05-05 18:30                   ` H.J. Lu
2021-05-05 18:48                     ` Florian Weimer
2021-05-05 18:50                       ` H.J. Lu
2021-05-05 19:08                         ` Florian Weimer
2021-05-05 19:32                           ` H.J. Lu
2021-05-05 19:53                             ` Florian Weimer
2021-05-05 19:03 ` Andreas Schwab
2021-05-05 19:10   ` Florian Weimer
2021-05-05 20:48     ` H.J. Lu
2021-05-05 20:53       ` H.J. Lu
2021-05-06  9:17         ` Florian Weimer
2021-05-06 12:08           ` H.J. Lu
2021-05-06 12:50             ` Florian Weimer
2021-05-06 12:58               ` Adhemerval Zanella [this message]
2021-05-06 13:15               ` H.J. Lu
2021-05-07 14:46 ` Florian Weimer
2021-05-07 16:40   ` H.J. Lu
2021-05-10 13:48     ` Florian Weimer
2021-05-10 14:02       ` H.J. Lu
2021-05-10 14:08         ` Florian Weimer
2021-05-11  0:04           ` 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=0f1a1f66-fbcf-8ece-6c35-5953560c5f17@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.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).