* [PATCH] Fix elf/tst-glibelf [BZ# 30402]
@ 2023-05-07 2:37 Paul Pluzhnikov
2023-05-07 2:42 ` Paul Pluzhnikov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Paul Pluzhnikov @ 2023-05-07 2:37 UTC (permalink / raw)
To: libc-alpha; +Cc: Hsiangkai Wang, Paul Pluzhnikov
Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC and
STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
(conflicts with DT_PLTRELSZ wich is also 2).
This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
elf/tst-relro-libc.
Fix this by reverting changes to elf/elf.h and updating
sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
---
elf/elf.h | 7 -------
sysdeps/riscv/dl-dtprocnum.h | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/elf/elf.h b/elf/elf.h
index 4f65b5a32d..94ca23c1bb 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -3933,13 +3933,6 @@ enum
#define R_TILEGX_NUM 130
-/* RISC-V specific values for the Dyn d_tag field. */
-#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
-#define DT_RISCV_NUM 2
-
-/* RISC-V specific values for the st_other field. */
-#define STO_RISCV_VARIANT_CC 0x80
-
/* RISC-V ELF Flags */
#define EF_RISCV_RVC 0x0001
#define EF_RISCV_FLOAT_ABI 0x0006
diff --git a/sysdeps/riscv/dl-dtprocnum.h b/sysdeps/riscv/dl-dtprocnum.h
index 281c5aadeb..d16f2415b5 100644
--- a/sysdeps/riscv/dl-dtprocnum.h
+++ b/sysdeps/riscv/dl-dtprocnum.h
@@ -18,4 +18,4 @@
/* Number of extra dynamic section entries for this architecture. By
default there are none. */
-#define DT_THISPROCNUM DT_RISCV_NUM
+#define DT_THISPROCNUM 2
--
2.40.1.521.gf1e218fcd8-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix elf/tst-glibelf [BZ# 30402]
2023-05-07 2:37 [PATCH] Fix elf/tst-glibelf [BZ# 30402] Paul Pluzhnikov
@ 2023-05-07 2:42 ` Paul Pluzhnikov
2023-05-07 2:59 ` Xi Ruoyao
2023-05-07 12:35 ` [PATCH] Fix elf/tst-glibelf [BZ# 30402] Florian Weimer
2 siblings, 0 replies; 5+ messages in thread
From: Paul Pluzhnikov @ 2023-05-07 2:42 UTC (permalink / raw)
To: libc-alpha; +Cc: Hsiangkai Wang
[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]
+cc hsiangkai@google.com
On Sat, May 6, 2023 at 7:37 PM Paul Pluzhnikov <ppluzhnikov@google.com>
wrote:
> Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC and
> STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
> (conflicts with DT_PLTRELSZ wich is also 2).
>
> This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
> elf/tst-relro-libc.
>
> Fix this by reverting changes to elf/elf.h and updating
> sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
> ---
> elf/elf.h | 7 -------
> sysdeps/riscv/dl-dtprocnum.h | 2 +-
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 4f65b5a32d..94ca23c1bb 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3933,13 +3933,6 @@ enum
>
> #define R_TILEGX_NUM 130
>
> -/* RISC-V specific values for the Dyn d_tag field. */
> -#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
> -#define DT_RISCV_NUM 2
> -
> -/* RISC-V specific values for the st_other field. */
> -#define STO_RISCV_VARIANT_CC 0x80
> -
> /* RISC-V ELF Flags */
> #define EF_RISCV_RVC 0x0001
> #define EF_RISCV_FLOAT_ABI 0x0006
> diff --git a/sysdeps/riscv/dl-dtprocnum.h b/sysdeps/riscv/dl-dtprocnum.h
> index 281c5aadeb..d16f2415b5 100644
> --- a/sysdeps/riscv/dl-dtprocnum.h
> +++ b/sysdeps/riscv/dl-dtprocnum.h
> @@ -18,4 +18,4 @@
>
> /* Number of extra dynamic section entries for this architecture. By
> default there are none. */
> -#define DT_THISPROCNUM DT_RISCV_NUM
> +#define DT_THISPROCNUM 2
> --
> 2.40.1.521.gf1e218fcd8-goog
>
>
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix elf/tst-glibelf [BZ# 30402]
2023-05-07 2:37 [PATCH] Fix elf/tst-glibelf [BZ# 30402] Paul Pluzhnikov
2023-05-07 2:42 ` Paul Pluzhnikov
@ 2023-05-07 2:59 ` Xi Ruoyao
2023-05-07 3:06 ` [PATCH] Fix [BZ# 30402] (failing tests elf/tst-{glibcelf,relro-ldso,relro-libc}) Paul Pluzhnikov
2023-05-07 12:35 ` [PATCH] Fix elf/tst-glibelf [BZ# 30402] Florian Weimer
2 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2023-05-07 2:59 UTC (permalink / raw)
To: Paul Pluzhnikov, libc-alpha; +Cc: Hsiangkai Wang
The subject should be "Fix elf/tst-glibcelf". Sorry for nitpicking but
glib is a completely different library, so let's not puzzle people :).
On Sun, 2023-05-07 at 02:37 +0000, Paul Pluzhnikov via Libc-alpha wrote:
> Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC
> and
> STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
> (conflicts with DT_PLTRELSZ wich is also 2).
>
> This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
> elf/tst-relro-libc.
>
> Fix this by reverting changes to elf/elf.h and updating
> sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
> ---
> elf/elf.h | 7 -------
> sysdeps/riscv/dl-dtprocnum.h | 2 +-
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 4f65b5a32d..94ca23c1bb 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3933,13 +3933,6 @@ enum
>
> #define R_TILEGX_NUM 130
>
> -/* RISC-V specific values for the Dyn d_tag field. */
> -#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
> -#define DT_RISCV_NUM 2
> -
> -/* RISC-V specific values for the st_other field. */
> -#define STO_RISCV_VARIANT_CC 0x80
> -
> /* RISC-V ELF Flags */
> #define EF_RISCV_RVC 0x0001
> #define EF_RISCV_FLOAT_ABI 0x0006
> diff --git a/sysdeps/riscv/dl-dtprocnum.h b/sysdeps/riscv/dl-
> dtprocnum.h
> index 281c5aadeb..d16f2415b5 100644
> --- a/sysdeps/riscv/dl-dtprocnum.h
> +++ b/sysdeps/riscv/dl-dtprocnum.h
> @@ -18,4 +18,4 @@
>
> /* Number of extra dynamic section entries for this architecture. By
> default there are none. */
> -#define DT_THISPROCNUM DT_RISCV_NUM
> +#define DT_THISPROCNUM 2
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix [BZ# 30402] (failing tests elf/tst-{glibcelf,relro-ldso,relro-libc})
2023-05-07 2:59 ` Xi Ruoyao
@ 2023-05-07 3:06 ` Paul Pluzhnikov
0 siblings, 0 replies; 5+ messages in thread
From: Paul Pluzhnikov @ 2023-05-07 3:06 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: GLIBC Devel, Hsiangkai Wang
You are right. I tweaked the commit message, but then sent the wrong
'git format-patch' result (contents of the patch is the same, only the
commit message is updated). Sorry about that.
I've updated the subject of this thread.
The tweaked commit message is:
Fix [BZ# 30402] (failing tests elf/tst-{glibcelf,relro-ldso,relro-libc})
Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC and
STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
(conflicts with DT_PLTRELSZ which is also 2).
This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
elf/tst-relro-libc.
Fix this by reverting changes to elf/elf.h and updating
sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
On Sat, May 6, 2023 at 7:59 PM Xi Ruoyao <xry111@xry111.site> wrote:
>
> The subject should be "Fix elf/tst-glibcelf". Sorry for nitpicking but
> glib is a completely different library, so let's not puzzle people :).
>
> On Sun, 2023-05-07 at 02:37 +0000, Paul Pluzhnikov via Libc-alpha wrote:
> > Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC
> > and
> > STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
> > (conflicts with DT_PLTRELSZ wich is also 2).
> >
> > This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
> > elf/tst-relro-libc.
> >
> > Fix this by reverting changes to elf/elf.h and updating
> > sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
> > ---
> > elf/elf.h | 7 -------
> > sysdeps/riscv/dl-dtprocnum.h | 2 +-
> > 2 files changed, 1 insertion(+), 8 deletions(-)
> >
> > diff --git a/elf/elf.h b/elf/elf.h
> > index 4f65b5a32d..94ca23c1bb 100644
> > --- a/elf/elf.h
> > +++ b/elf/elf.h
> > @@ -3933,13 +3933,6 @@ enum
> >
> > #define R_TILEGX_NUM 130
> >
> > -/* RISC-V specific values for the Dyn d_tag field. */
> > -#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
> > -#define DT_RISCV_NUM 2
> > -
> > -/* RISC-V specific values for the st_other field. */
> > -#define STO_RISCV_VARIANT_CC 0x80
> > -
> > /* RISC-V ELF Flags */
> > #define EF_RISCV_RVC 0x0001
> > #define EF_RISCV_FLOAT_ABI 0x0006
> > diff --git a/sysdeps/riscv/dl-dtprocnum.h b/sysdeps/riscv/dl-
> > dtprocnum.h
> > index 281c5aadeb..d16f2415b5 100644
> > --- a/sysdeps/riscv/dl-dtprocnum.h
> > +++ b/sysdeps/riscv/dl-dtprocnum.h
> > @@ -18,4 +18,4 @@
> >
> > /* Number of extra dynamic section entries for this architecture. By
> > default there are none. */
> > -#define DT_THISPROCNUM DT_RISCV_NUM
> > +#define DT_THISPROCNUM 2
>
> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix elf/tst-glibelf [BZ# 30402]
2023-05-07 2:37 [PATCH] Fix elf/tst-glibelf [BZ# 30402] Paul Pluzhnikov
2023-05-07 2:42 ` Paul Pluzhnikov
2023-05-07 2:59 ` Xi Ruoyao
@ 2023-05-07 12:35 ` Florian Weimer
2 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2023-05-07 12:35 UTC (permalink / raw)
To: Paul Pluzhnikov via Libc-alpha
Cc: Paul Pluzhnikov, Hsiangkai Wang, Palmer Dabbelt
* Paul Pluzhnikov via Libc-alpha:
> Commit 117e8b341c5 added duplicate definitions of DT_RISCV_VARIANT_CC and
> STO_RISCV_VARIANT_CC, as well as defining DT_RISCV_NUM to 2
> (conflicts with DT_PLTRELSZ wich is also 2).
>
> This broke several tests: elf/tst-glibcelf, elf/tst-relro-ldso,
> elf/tst-relro-libc.
>
> Fix this by reverting changes to elf/elf.h and updating
> sysdeps/riscv/dl-dtprocnum.h to define DT_THISPROCNUM directly.
> ---
> elf/elf.h | 7 -------
> sysdeps/riscv/dl-dtprocnum.h | 2 +-
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 4f65b5a32d..94ca23c1bb 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -3933,13 +3933,6 @@ enum
>
> #define R_TILEGX_NUM 130
>
> -/* RISC-V specific values for the Dyn d_tag field. */
> -#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
> -#define DT_RISCV_NUM 2
> -
> -/* RISC-V specific values for the st_other field. */
> -#define STO_RISCV_VARIANT_CC 0x80
> -
I've pushed a straight revert instead because STO_RISCV_VARIANT_CC is
needed by the RISC-V changes.
I think the conclusion on the other thread was that we should revert
this anyway, to simplify the fixes.
Thanks,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-07 12:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-07 2:37 [PATCH] Fix elf/tst-glibelf [BZ# 30402] Paul Pluzhnikov
2023-05-07 2:42 ` Paul Pluzhnikov
2023-05-07 2:59 ` Xi Ruoyao
2023-05-07 3:06 ` [PATCH] Fix [BZ# 30402] (failing tests elf/tst-{glibcelf,relro-ldso,relro-libc}) Paul Pluzhnikov
2023-05-07 12:35 ` [PATCH] Fix elf/tst-glibelf [BZ# 30402] Florian Weimer
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).