[PATCH] Fix elf/tst-glibelf [BZ# 30402]

Florian Weimer fweimer@redhat.com
Sun May 7 12:35:34 GMT 2023


* 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



More information about the Libc-alpha mailing list