[PATCH v11] nptl: fix potential merge of __rseq_* relro symbols

Michael Jeanson mjeanson@efficios.com
Thu Jul 4 15:27:24 GMT 2024


On 2024-07-04 09:11, Adhemerval Zanella Netto wrote:
> 
> This has broken Hurd:
> 
> dl-rseq-symbols.S:21:5: error: "__WORDSIZE" is not defined, evaluates to 0 [-Werror=undef]
>     21 | #if __WORDSIZE == 64
>        |     ^~~~~~~~~~
> cc1: some warnings being treated as errors
> 
> Although the fix would be simple (just include wordsize.h), the RSEQ support also
> does not make sense to be in generic API anyway.  I am checking this patch to make
> Linux only:
> 
> diff --git a/elf/Makefile b/elf/Makefile
> index 147f1d3437..a3475f3fb5 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -73,7 +73,6 @@ dl-routines = \
>     dl-origin \
>     dl-printf \
>     dl-reloc \
> -  dl-rseq-symbols \
>     dl-runtime \
>     dl-scope \
>     dl-setup_hash \
> diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
> index ae66590e91..097b5a26fc 100644
> --- a/sysdeps/unix/sysv/linux/Makefile
> +++ b/sysdeps/unix/sysv/linux/Makefile
> @@ -616,6 +616,10 @@ tests += \
>   endif
>   
>   ifeq ($(subdir),elf)
> +dl-routines += \
> +  dl-rseq-symbols \
> +  # dl-routines
> +
>   sysdep-rtld-routines += \
>     dl-brk \
>     dl-getcwd \
> diff --git a/elf/dl-rseq-symbols.S b/sysdeps/unix/sysv/linux/dl-rseq-symbols.S
> similarity index 100%
> rename from elf/dl-rseq-symbols.S
> rename to sysdeps/unix/sysv/linux/dl-rseq-symbols.S

Thanks for fixing this, I was wondering if there was a document somewhere 
describing at a high level how the glibc build system works? I am used to 
'regular' autotools projects and the glibc stuff seems quite different.

Florian pointed me to build-many-glibcs.py to build test my patches against 
Hurd which I'm looking into at the moment.

Michael


More information about the Libc-alpha mailing list