ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528]

System Internals / glibc - H.J. Lu [gmail.com] - 8 June 2017 15:52 EDT

There are 2 minimal strtoul implementations in ld.so:

1. __strtoul_internal in elf/dl-minimal.c. 2. tunables_strtoul in elf/dl-tunables.c.

This patch adds _dl_strtoul to replace them. Tested builds with and without --enable-tunables.

[BZ #21528]
- elf/dl-minimal.c (__strtoul_internal): Removed. (strtoul): Likewise.
- elf/dl-misc.c (_dl_strtoul): New function.
- elf/dl-tunables.c (tunables_strtoul): Removed. (tunable_initialize): Replace tunables_strtoul with _dl_strtoul.
- elf/rtld.c (process_envvars): Likewise.
- sysdeps/unix/sysv/linux/dl-librecon.h (_dl_osversion_init): Likewise.
- sysdeps/generic/ldsodefs.h (_dl_strtoul): New prototype.

37b66c0 ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528]
ChangeLog | 13 ++++++
elf/dl-minimal.c | 84 -----------------------------------
elf/dl-misc.c | 84 +++++++++++++++++++++++++++++++++++
elf/dl-tunables.c | 69 +---------------------------
elf/rtld.c | 3 +-
sysdeps/generic/ldsodefs.h | 4 ++
sysdeps/unix/sysv/linux/dl-librecon.h | 2 +-
7 files changed, 104 insertions(+), 155 deletions(-)

Upstream: sourceware.org


  • Share