Linux: Consolidate auxiliary vector parsing
authorFlorian Weimer <fweimer@redhat.com>
Thu, 3 Feb 2022 09:58:59 +0000 (10:58 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 10 Feb 2022 10:51:55 +0000 (11:51 +0100)
commit8c8510ab2790039e58995ef3a22309582413d3ff
tree3ebd93ae5708d2f67a546aeccb200dd5b1dad06c
parentf19fc997a5754a6c0bb9e43618f0597e878061f7
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>
elf/dl-support.c
sysdeps/unix/sysv/linux/alpha/dl-auxv.h
sysdeps/unix/sysv/linux/dl-parse_auxv.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/dl-sysdep.c
sysdeps/unix/sysv/linux/powerpc/dl-auxv.h
sysdeps/unix/sysv/linux/powerpc/dl-support.c [new file with mode: 0644]