Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 30 Oct 2012 05:57:33 +0400
From: "Dmitry V. Levin" <ldv@...linux.org>
To: owl-dev@...ts.openwall.com
Subject: Re: glibc

On Mon, Oct 29, 2012 at 11:34:39PM +0400, Dmitry V. Levin wrote:
> On Mon, Oct 29, 2012 at 10:17:48PM +0400, Vasily Kulikov wrote:
> [...]
> > 'strncmp' symbol is present on x86_64, but absent on i686:
> > 
> >     $ readelf -s logs/glibc-build-i386/elf/rtld-libc.a | grep strncmp
> >         22: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND strncmp
> >     File: logs/glibc-build-i386/elf/rtld-libc.a(rtld-strncmp-c.os)
> >          1: 00000000     0 FILE    LOCAL  DEFAULT  ABS strncmp-c.c
> >         15: 00000000   279 FUNC    GLOBAL DEFAULT    1 __strncmp_ia32
> >         16: 00000000   279 FUNC    GLOBAL DEFAULT    1 __GI_strncmp
> > 
> >     $ readelf -s logs/glibc-build-x86_64/elf/rtld-libc.a | grep strncmp
> >         19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND strncmp
> >     File: logs/glibc-build-x86_64/elf/rtld-libc.a(rtld-strncmp.os)
> >         10: 0000000000000000    33 FUNC    GLOBAL DEFAULT    1 strncmp
> >     File: logs/glibc-build-x86_64/elf/rtld-libc.a(rtld-strncmp-ssse3.os)
> >         11: 0000000000000000    33 FUNC    GLOBAL DEFAULT    4 __strncmp_ssse3
> 
> The difference between x86_64 and i686 is due to STT_GNU_IFUNC.

Try this:

--- a/sysdeps/i386/i686/multiarch/Makefile
+++ b/sysdeps/i386/i686/multiarch/Makefile
@@ -24,6 +24,7 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
 		   strcasecmp_l-c strcasecmp-c strcasecmp_l-ssse3 \
 		   strncase_l-c strncase-c strncase_l-ssse3 \
 		   strcasecmp_l-sse4 strncase_l-sse4
+sysdep-rtld-routines += strncmp-c strncmp-ssse3 strncmp-sse4
 ifeq (yes,$(config-cflags-sse4))
 sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c
 CFLAGS-varshift.c += -msse4


-- 
ldv

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.