public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "Lucas A. M. Magalhaes" <lamm@linux.ibm.com>,
	libc-alpha@sourceware.org, fweimer@redhat.com,
	tuliom@linux.ibm.com
Subject: Re: [PATCH] powerpc: Use FLAG_ELF_LIBC6 for 32-bit known libraries
Date: Fri, 4 Mar 2022 15:49:47 -0300	[thread overview]
Message-ID: <5d862936-6fa5-c38f-23bf-c73223a523b3@linaro.org> (raw)
In-Reply-To: <20220302193048.laaynlw7k3dzcz67@workbox>



On 02/03/2022 16:30, Raoni Fassina Firmino wrote:
> On Fri, Dec 03, 2021 at 11:51:29AM -0300, AL glibc-alpha wrote:
>>
>>
>> On 04/11/2021 15:10, Lucas A. M. Magalhaes via Libc-alpha wrote:
>>> In systems with more versions of the known libraries, i.e. on IBM
>>> Advance Toolchain, ldconfig will order them incorrectly on ld.cache.
>>>
>>> The issue only occurs with 32-bit libraries that don't depend on libc or
>>> libm. That's because process_elf32_file check if the elf depends on one
>>> of the libraries at known_libs to select the elf flag. For example, as
>>> libc.so.6 don't depend on itself or on libm it will be flagged as
>>> FLAG_ELF instead of FLAG_ELF_LIBC6 as expected.
>>
>> Wouldn't be simpler to check if the DT_SONAME matches any on 'known_libs' after
>> dynamic section parsing and set the appropriated flag on generic 'process_file'? 
> 
> But then it would touch every architecture, I think since this is only a
> problem affecting powerpc (BE 32bits) I don't think it is worth touch
> the generic code if will not help any other architecture.

Which is not a bad idea, removing arch-specific code and make the ldconfig
have a similar semantic interdependently of the ABI is a good move forward. 

> 
> 
>> (also powerpc SYSDEP_KNOWN_LIBRARY_NAMES seems redundant).
> 
> Seems to be the same as every other arch except i386. Lookin at Lucas's
> RFC for removal of libc.5 and libc.4 compatibility, maybe it being
> diferent in i386 is just that it was never really used anymore, and so
> never updated.

I think it would be better to send this change along the the RPC to
remove libc4/libc5 compatibility.  I am already proposing dropping some 
support for old lib5/aout files [1], which Florian thinks it is ok,
so I take that dropping all support for libc4/libc5 is a way forward.

In fact, with libc4/libc5 removal I think this patch is not really 
required.

[1] https://patchwork.sourceware.org/project/glibc/patch/20220304133801.1868553-4-adhemerval.zanella@linaro.org/

  reply	other threads:[~2022-03-04 18:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 21:12 [PATCH] powerpc: Use the correct flag " Lucas A. M. Magalhaes
2021-10-25 18:22 ` Florian Weimer
2021-12-22 15:31   ` [RFC] Remove special flags of libc.5.so and libc.4.so Lucas A. M. Magalhaes
2022-01-10 19:21     ` Lucas A. M. Magalhaes
2022-01-11 19:22     ` Adhemerval Zanella
2022-03-02 19:37       ` Raoni Fassina Firmino
2022-03-04 18:38         ` Adhemerval Zanella
2022-02-23 22:17     ` Raoni Fassina Firmino
2021-11-04 18:10 ` [PATCH] powerpc: Use FLAG_ELF_LIBC6 for 32-bit known libraries Lucas A. M. Magalhaes
2021-12-03 12:40   ` Lucas A. M. Magalhaes
2021-12-03 14:17   ` Florian Weimer
2021-12-03 14:51   ` Adhemerval Zanella
2022-03-02 19:30     ` Raoni Fassina Firmino
2022-03-04 18:49       ` Adhemerval Zanella [this message]
2022-02-23 22:09   ` Raoni Fassina Firmino

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=5d862936-6fa5-c38f-23bf-c73223a523b3@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=lamm@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tuliom@linux.ibm.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).