[v3,2/2] x86: Make dl-cache.h and readelflib.c not Linux-specific

Message ID 20230617164026.124004-2-bugaevc@gmail.com
State Committed
Commit 520b1df08de68a3de328b65a25b86300a7ddf512
Headers
Series [v3,1/2] elf: Port ldconfig away from stack-allocated paths |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed

Commit Message

Sergey Bugaev June 17, 2023, 4:40 p.m. UTC
  These files could be useful to any port that wants to use ld.so.cache.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/{unix/sysv/linux => }/x86/readelflib.c  | 0
 sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename sysdeps/{unix/sysv/linux => }/x86/readelflib.c (100%)
 rename sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h (100%)
  

Comments

Adhemerval Zanella Netto June 21, 2023, 1:28 p.m. UTC | #1
On 17/06/23 13:40, Sergey Bugaev via Libc-alpha wrote:
> These files could be useful to any port that wants to use ld.so.cache.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/{unix/sysv/linux => }/x86/readelflib.c  | 0
>  sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h | 0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/{unix/sysv/linux => }/x86/readelflib.c (100%)
>  rename sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h (100%)
> 
> diff --git a/sysdeps/unix/sysv/linux/x86/readelflib.c b/sysdeps/x86/readelflib.c
> similarity index 100%
> rename from sysdeps/unix/sysv/linux/x86/readelflib.c
> rename to sysdeps/x86/readelflib.c
> diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-cache.h b/sysdeps/x86_64/dl-cache.h
> similarity index 100%
> rename from sysdeps/unix/sysv/linux/x86_64/dl-cache.h
> rename to sysdeps/x86_64/dl-cache.h
  
Sergey Bugaev June 23, 2023, 12:36 p.m. UTC | #2
Hello,

On Wed, Jun 21, 2023 at 4:28 PM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Thanks.

So assuming everyone is happy with this patchset now, what is the
process for getting it pushed? Do I need to ping anyone specific?
Previously Samuel pushed my patches after reviewing them, but I
imagine that wouldn't be the case for patches that are not
Hurd-specific.

(And please also reply to the question about Reviewed-by in the previous patch!)

Sergey
  
Adhemerval Zanella Netto June 23, 2023, 12:46 p.m. UTC | #3
On 23/06/23 09:36, Sergey Bugaev wrote:
> Hello,
> 
> On Wed, Jun 21, 2023 at 4:28 PM Adhemerval Zanella Netto
> <adhemerval.zanella@linaro.org> wrote:
>> LGTM, thanks.
>>
>> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
> 
> Thanks.
> 
> So assuming everyone is happy with this patchset now, what is the
> process for getting it pushed? Do I need to ping anyone specific?
> Previously Samuel pushed my patches after reviewing them, but I
> imagine that wouldn't be the case for patches that are not
> Hurd-specific.
> 
> (And please also reply to the question about Reviewed-by in the previous patch!)

I will take care of this.
  
Joseph Myers June 26, 2023, 7:39 p.m. UTC | #4
On Sat, 17 Jun 2023, Sergey Bugaev via Libc-alpha wrote:

> These files could be useful to any port that wants to use ld.so.cache.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/{unix/sysv/linux => }/x86/readelflib.c  | 0
>  sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h | 0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/{unix/sysv/linux => }/x86/readelflib.c (100%)
>  rename sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h (100%)

This broke the build for x32.

In file included from dl-cache.c:23:
../sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h:19:10: fatal error: sysdeps/unix/sysv/linux/x86_64/dl-cache.h: No such file or directory
   19 | #include <sysdeps/unix/sysv/linux/x86_64/dl-cache.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
Adhemerval Zanella Netto June 26, 2023, 7:50 p.m. UTC | #5
On 26/06/23 16:39, Joseph Myers wrote:
> On Sat, 17 Jun 2023, Sergey Bugaev via Libc-alpha wrote:
> 
>> These files could be useful to any port that wants to use ld.so.cache.
>>
>> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
>> ---
>>  sysdeps/{unix/sysv/linux => }/x86/readelflib.c  | 0
>>  sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h | 0
>>  2 files changed, 0 insertions(+), 0 deletions(-)
>>  rename sysdeps/{unix/sysv/linux => }/x86/readelflib.c (100%)
>>  rename sysdeps/{unix/sysv/linux => }/x86_64/dl-cache.h (100%)
> 
> This broke the build for x32.
> 
> In file included from dl-cache.c:23:
> ../sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h:19:10: fatal error: sysdeps/unix/sysv/linux/x86_64/dl-cache.h: No such file or directory
>    19 | #include <sysdeps/unix/sysv/linux/x86_64/dl-cache.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 

It is a straightforward change, I will install a fix.
  
Sergey Bugaev June 26, 2023, 8:05 p.m. UTC | #6
On Mon, Jun 26, 2023 at 10:39 PM Joseph Myers <joseph@codesourcery.com> wrote:
> This broke the build for x32.
>
> In file included from dl-cache.c:23:
> ../sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h:19:10: fatal error: sysdeps/unix/sysv/linux/x86_64/dl-cache.h: No such file or directory
>    19 | #include <sysdeps/unix/sysv/linux/x86_64/dl-cache.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thank you :|

Would just #include_next <dl-cache.h> work here? Otherwise, it's
#include <sysdeps/x86_64/dl-cache.h> now.

I'll send a patch.

Sergey
  
Sergey Bugaev June 26, 2023, 8:09 p.m. UTC | #7
On Mon, Jun 26, 2023 at 11:05 PM Sergey Bugaev <bugaevc@gmail.com> wrote:
> I'll send a patch.

Ah, I see Adhemerval has fixed it already.

Sergey
  

Patch

diff --git a/sysdeps/unix/sysv/linux/x86/readelflib.c b/sysdeps/x86/readelflib.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86/readelflib.c
rename to sysdeps/x86/readelflib.c
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-cache.h b/sysdeps/x86_64/dl-cache.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/x86_64/dl-cache.h
rename to sysdeps/x86_64/dl-cache.h