aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-02-03 10:58:59 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-02-10 11:51:55 +0100
commit8c8510ab2790039e58995ef3a22309582413d3ff (patch)
tree3ebd93ae5708d2f67a546aeccb200dd5b1dad06c /sysdeps/unix/sysv/linux/powerpc
parentf19fc997a5754a6c0bb9e43618f0597e878061f7 (diff)
downloadglibc-8c8510ab2790039e58995ef3a22309582413d3ff.tar
glibc-8c8510ab2790039e58995ef3a22309582413d3ff.tar.gz
glibc-8c8510ab2790039e58995ef3a22309582413d3ff.tar.bz2
glibc-8c8510ab2790039e58995ef3a22309582413d3ff.zip
Linux: Consolidate auxiliary vector parsing
And optimize it slightly. The large switch statement in _dl_sysdep_start can be replaced with a large array. This reduces source code and binary size. On i686-linux-gnu: Before: text data bss dec hex filename 7791 12 0 7803 1e7b elf/dl-sysdep.os After: text data bss dec hex filename 7135 12 0 7147 1beb elf/dl-sysdep.os Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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, 6 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
index 594371940a..ce2281cf11 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
@@ -16,15 +16,5 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#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;
+#define DL_PLATFORM_AUXV \
+ GLRO(dl_cache_line_size) = auxv_values[AT_DCACHEBSIZE];
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-support.c b/sysdeps/unix/sysv/linux/powerpc/dl-support.c
new file mode 100644
index 0000000000..abe68a7049
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-support.c
@@ -0,0 +1,4 @@
+#include <elf/dl-support.c>
+
+/* Populated from the auxiliary vector. */
+int _dl_cache_line_size;