[PATCH 7/9] posix: Consolidate glob implementation

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Sep 12 14:22:00 GMT 2017



On 12/09/2017 09:56, Andreas Schwab wrote:
> On Sep 05 2017, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
> 
>> diff --git a/sysdeps/unix/sysv/linux/oldglob.c b/sysdeps/unix/sysv/linux/oldglob.c
>> index 8233e57..5402450 100644
>> --- a/sysdeps/unix/sysv/linux/oldglob.c
>> +++ b/sysdeps/unix/sysv/linux/oldglob.c
>> @@ -1,12 +1,13 @@
>>  #include <shlib-compat.h>
>>  
>> -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
>> +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) \
>> +    && !defined(GLOB_NO_OLD_VERSION)
> 
> There is nothing that defines GLOB_NO_OLD_VERSION for s390-32.
> 
> Andreas.
> 

Yes, this is wrong since oldglob.c as default will create symbol where
for s390 it should not.  S390 requires a arch-specific oldglob.c as

#define GLOB_NO_OLD_VERSION
#include <sysdeps/unix/sysv/linux/oldglob.c>

So glob64.os will the only object providing glob64 symbols.  With this
file now I see:

$ /s390x-glibc-linux-gnu-objdump -t posix/glob64.os | grep glob64
posix/glob64.os:     file format elf32-s390
000009b0 g     F .text  0000144e __glob64
000009b0 g     F .text  0000144e .hidden __GI_glob64
000009b0 g     F .text  0000144e glob64
$ s390x-glibc-linux-gnu-objdump -t posix/oldglob.os | grep glob64
$ 

I will fix it and maybe it is confusing the linker and making you seem
the missing glob64 (since oldglob.os and glob64.os both provide the
same symbol).



More information about the Libc-alpha mailing list