From 37b66c0b1a2156a43fb813499326230639ba2773 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 8 Jun 2017 12:52:42 -0700 Subject: ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528] 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. --- sysdeps/unix/sysv/linux/dl-librecon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/dl-librecon.h b/sysdeps/unix/sysv/linux/dl-librecon.h index a6e54bed75..e726ff29bb 100644 --- a/sysdeps/unix/sysv/linux/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/dl-librecon.h @@ -28,7 +28,7 @@ _dl_osversion_init (char *assume_kernel) for (i = 0; i < 3; i++, p = q + 1) { - j = __strtoul_internal (p, &q, 0, 0); + j = _dl_strtoul (p, &q); if (j >= 255 || p == q || (i < 2 && *q && *q != '.')) { osversion = 0; -- cgit 1.4.1