about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-02-11 16:01:19 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-02-11 17:10:59 +0100
commitd96d2995c1121d3310102afda2deb1f35761b5e6 (patch)
treee685f4927e3aa429d3a98abcdb1f9fd7c577a2d1 /sysdeps/unix/sysv/linux/powerpc
parent02561bb48a26429a238cbd6afbe5998dabcc4546 (diff)
downloadglibc-d96d2995c1121d3310102afda2deb1f35761b5e6.tar.gz
glibc-d96d2995c1121d3310102afda2deb1f35761b5e6.tar.xz
glibc-d96d2995c1121d3310102afda2deb1f35761b5e6.zip
Revert "Linux: Consolidate auxiliary vector parsing"
This reverts commit 8c8510ab2790039e58995ef3a22309582413d3ff.  The
revert is not perfect because the commit included a bug fix for
_dl_sysdep_start with an empty argv, introduced in commit
2d47fa68628e831a692cba8fc9050cef435afc5e ("Linux: Remove
DL_FIND_ARG_COMPONENTS"), and this bug fix is kept.

The revert is necessary because the reverted commit introduced an
early memset call on aarch64, which leads to crash due to lack of TCB
initialization.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-auxv.h14
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-support.c4
2 files changed, 12 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
index ce2281cf11..594371940a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
@@ -16,5 +16,15 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#define DL_PLATFORM_AUXV \
-  GLRO(dl_cache_line_size) = auxv_values[AT_DCACHEBSIZE];
+#include <ldsodefs.h>
+
+#if IS_IN (libc) && !defined SHARED
+int GLRO(dl_cache_line_size);
+#endif
+
+/* Scan the Aux Vector for the "Data Cache Block Size" entry and assign it
+   to dl_cache_line_size.  */
+#define DL_PLATFORM_AUXV						      \
+      case AT_DCACHEBSIZE:						      \
+	GLRO(dl_cache_line_size) = av->a_un.a_val;			      \
+	break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-support.c b/sysdeps/unix/sysv/linux/powerpc/dl-support.c
deleted file mode 100644
index abe68a7049..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/dl-support.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <elf/dl-support.c>
-
-/* Populated from the auxiliary vector.  */
-int _dl_cache_line_size;