elf: Document late page size initialization via _dl_var_init
Commit Message
[For riscv, see the removal I just posted.]
2019-09-30 Florian Weimer <fweimer@redhat.com>
* sysdeps/unix/sysv/linux/aarch64/dl-static.c (_dl_var_init): Add
comment.
* sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_var_init):
Likewise.
* sysdeps/unix/sysv/linux/m68k/dl-static.c (_dl_var_init):
Likewise.
* sysdeps/unix/sysv/linux/mips/dl-static.c (_dl_var_init):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/dl-static.c (_dl_var_init):
Likewise.
Comments
Ping. This patch needs review:
<https://sourceware.org/ml/libc-alpha/2019-09/msg00507.html>
Thanks,
Florian
* Florian Weimer:
> [For riscv, see the removal I just posted.]
>
> 2019-09-30 Florian Weimer <fweimer@redhat.com>
>
> * sysdeps/unix/sysv/linux/aarch64/dl-static.c (_dl_var_init): Add
> comment.
> * sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_var_init):
> Likewise.
> * sysdeps/unix/sysv/linux/m68k/dl-static.c (_dl_var_init):
> Likewise.
> * sysdeps/unix/sysv/linux/mips/dl-static.c (_dl_var_init):
> Likewise.
> * sysdeps/unix/sysv/linux/powerpc/dl-static.c (_dl_var_init):
> Likewise.
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-static.c b/sysdeps/unix/sysv/linux/aarch64/dl-static.c
> index b444723a6f..992440b504 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/dl-static.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/dl-static.c
> @@ -20,6 +20,12 @@
>
> #ifdef SHARED
>
> +/* Update GLRO(dl_pagesize) to the run-time page size. After static
> + dlopen, the constant initializer EXEC_PAGESIZE for
> + GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
> + which do not use EXEC_PAGESIZE as the page size. (In the static
> + dlopen case, the ld.so initialization code never runs because the
> + inner dynamic loader is not active.) */
> void
> _dl_var_init (void *array[])
> {
> diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c
> index aaf09adc0c..3a5fb3a958 100644
> --- a/sysdeps/unix/sysv/linux/ia64/dl-static.c
> +++ b/sysdeps/unix/sysv/linux/ia64/dl-static.c
> @@ -20,6 +20,14 @@
>
> #ifdef SHARED
>
> +/* Update GLRO(dl_pagesize) and GLRO(dl_clktck).
> +
> + After static dlopen, the constant initializer EXEC_PAGESIZE for
> + GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
> + which do not use EXEC_PAGESIZE as the page size. (In the static
> + dlopen case, the ld.so initialization code never runs because the
> + inner dynamic loader is not active.) Likewise for
> + GLRO(dl_clktck). */
> void
> _dl_var_init (void *array[])
> {
> diff --git a/sysdeps/unix/sysv/linux/m68k/dl-static.c b/sysdeps/unix/sysv/linux/m68k/dl-static.c
> index 7ad0f0790f..8ab3abda68 100644
> --- a/sysdeps/unix/sysv/linux/m68k/dl-static.c
> +++ b/sysdeps/unix/sysv/linux/m68k/dl-static.c
> @@ -20,6 +20,12 @@
>
> #ifdef SHARED
>
> +/* Update GLRO(dl_pagesize) to the run-time page size. After static
> + dlopen, the constant initializer EXEC_PAGESIZE for
> + GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
> + which do not use EXEC_PAGESIZE as the page size. (In the static
> + dlopen case, the ld.so initialization code never runs because the
> + inner dynamic loader is not active.) */
> void
> _dl_var_init (void *array[])
> {
> diff --git a/sysdeps/unix/sysv/linux/mips/dl-static.c b/sysdeps/unix/sysv/linux/mips/dl-static.c
> index c71c18de71..4a606e42a2 100644
> --- a/sysdeps/unix/sysv/linux/mips/dl-static.c
> +++ b/sysdeps/unix/sysv/linux/mips/dl-static.c
> @@ -20,6 +20,12 @@
>
> #ifdef SHARED
>
> +/* Update GLRO(dl_pagesize) to the run-time page size. After static
> + dlopen, the constant initializer EXEC_PAGESIZE for
> + GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
> + which do not use EXEC_PAGESIZE as the page size. (In the static
> + dlopen case, the ld.so initialization code never runs because the
> + inner dynamic loader is not active.) */
> void
> _dl_var_init (void *array[])
> {
> diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-static.c b/sysdeps/unix/sysv/linux/powerpc/dl-static.c
> index d176f96495..ff0cdf46fa 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/dl-static.c
> +++ b/sysdeps/unix/sysv/linux/powerpc/dl-static.c
> @@ -20,6 +20,12 @@
>
> #ifdef SHARED
>
> +/* Update GLRO(dl_pagesize) to the run-time page size. After static
> + dlopen, the constant initializer EXEC_PAGESIZE for
> + GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
> + which do not use EXEC_PAGESIZE as the page size. (In the static
> + dlopen case, the ld.so initialization code never runs because the
> + inner dynamic loader is not active.) */
> void
> _dl_var_init (void *array[])
> {
@@ -20,6 +20,12 @@
#ifdef SHARED
+/* Update GLRO(dl_pagesize) to the run-time page size. After static
+ dlopen, the constant initializer EXEC_PAGESIZE for
+ GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
+ which do not use EXEC_PAGESIZE as the page size. (In the static
+ dlopen case, the ld.so initialization code never runs because the
+ inner dynamic loader is not active.) */
void
_dl_var_init (void *array[])
{
@@ -20,6 +20,14 @@
#ifdef SHARED
+/* Update GLRO(dl_pagesize) and GLRO(dl_clktck).
+
+ After static dlopen, the constant initializer EXEC_PAGESIZE for
+ GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
+ which do not use EXEC_PAGESIZE as the page size. (In the static
+ dlopen case, the ld.so initialization code never runs because the
+ inner dynamic loader is not active.) Likewise for
+ GLRO(dl_clktck). */
void
_dl_var_init (void *array[])
{
@@ -20,6 +20,12 @@
#ifdef SHARED
+/* Update GLRO(dl_pagesize) to the run-time page size. After static
+ dlopen, the constant initializer EXEC_PAGESIZE for
+ GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
+ which do not use EXEC_PAGESIZE as the page size. (In the static
+ dlopen case, the ld.so initialization code never runs because the
+ inner dynamic loader is not active.) */
void
_dl_var_init (void *array[])
{
@@ -20,6 +20,12 @@
#ifdef SHARED
+/* Update GLRO(dl_pagesize) to the run-time page size. After static
+ dlopen, the constant initializer EXEC_PAGESIZE for
+ GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
+ which do not use EXEC_PAGESIZE as the page size. (In the static
+ dlopen case, the ld.so initialization code never runs because the
+ inner dynamic loader is not active.) */
void
_dl_var_init (void *array[])
{
@@ -20,6 +20,12 @@
#ifdef SHARED
+/* Update GLRO(dl_pagesize) to the run-time page size. After static
+ dlopen, the constant initializer EXEC_PAGESIZE for
+ GLRO(dl_pagesize) in elf/rtld.c is not correct for implementations
+ which do not use EXEC_PAGESIZE as the page size. (In the static
+ dlopen case, the ld.so initialization code never runs because the
+ inner dynamic loader is not active.) */
void
_dl_var_init (void *array[])
{