diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2021-07-14 15:58:08 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2021-07-14 16:59:12 +0200 |
commit | 0e1f068108d94576321bbbd354cfb1b3b99389bf (patch) | |
tree | 0b0d6cc90de8e35c2943f778d3c3411c6e7f0319 /nss/nss_files/files-alias.c | |
parent | 84d40d702fb094dda8fb8b7fd4d8042b03ac23ac (diff) | |
download | glibc-0e1f068108d94576321bbbd354cfb1b3b99389bf.zip glibc-0e1f068108d94576321bbbd354cfb1b3b99389bf.tar.gz glibc-0e1f068108d94576321bbbd354cfb1b3b99389bf.tar.bz2 |
Fix linknamespace errors and local-plt-usages in nss_files.
After commit f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf
"nss: Access nss_files through direct references",
when building with -Os, multiple conform/.../linknamespace tests
and elf/check-localplt are failing:
Extra PLT reference: libc.so: fgetc_unlocked
Extra PLT reference: libc.so: getline
Or e.g.:
[initial] glob -> [libc.a(glob.o)] __getpwnam_r -> [libc.a(getpwnam_r.o)] __nss_database_custom -> [libc.a(nsswitch.o)] __nss_module_get_function -> [libc.a(nss_module.o)] __nss_files_functions -> [libc.a(nss_files_functions.o)] _nss_files_endaliasent -> [libc.a(files-alias.o)] feof_unlocked
[initial] glob -> [libc.a(glob.o)] __getpwnam_r -> [libc.a(getpwnam_r.o)] __nss_database_custom -> [libc.a(nsswitch.o)] __nss_module_get_function -> [libc.a(nss_module.o)] __nss_files_functions -> [libc.a(nss_files_functions.o)] _nss_files_endaliasent -> [libc.a(files-alias.o)] fgetc_unlocked
[initial] glob -> [libc.a(glob.o)] __getpwnam_r -> [libc.a(getpwnam_r.o)] __nss_database_custom -> [libc.a(nsswitch.o)] __nss_module_get_function -> [libc.a(nss_module.o)] __nss_files_functions -> [libc.a(nss_files_functions.o)] _nss_files_endnetgrent -> [libc.a(files-netgrp.o)] getline
This patch is using the hidden symbols where possible.
Instead of fputc_unlocked, __putc_unlocked is used.
(Compare to commit eeaa19f75e52d2d48074ae0c423f2311d67c42c6
"mntent: Use __putc_unlocked instead of fputc_unlocked")
Diffstat (limited to 'nss/nss_files/files-alias.c')
-rw-r--r-- | nss/nss_files/files-alias.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c index 8c6e176..2a4023b 100644 --- a/nss/nss_files/files-alias.c +++ b/nss/nss_files/files-alias.c @@ -189,7 +189,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, if (listfile != NULL && (old_line = __strdup (line)) != NULL) { - while (! feof_unlocked (listfile)) + while (! __feof_unlocked (listfile)) { if (room_left < 2) { @@ -269,7 +269,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, just read character. */ int ch; - ch = fgetc_unlocked (stream); + ch = __getc_unlocked (stream); if (ch == EOF || ch == '\n' || !isspace (ch)) { size_t cnt; |