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

On Tue, Oct 30, 2012 at 08:00:20PM +0400, Vasily Kulikov wrote:
> On Tue, Oct 30, 2012 at 05:57 +0400, Dmitry V. Levin wrote:
> > 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:
[...]
> > > The direct using of 'getenv' adds the dependency.  Commenting 2 usages
> > > of 'getenv' in the patch removed the linking problem.
> > 
> > Which ones?
> 
>     const char *value = getenv (cp);
> 
> and
> 
>     const char *value = getenv (nextp);
> 
> from _dl_non_dynamic_init() and process_envvars(), respectively.

The first one already contains references to getenv, and it goes to libc.a
anyway, so this is not an issue.

The second one comes from elf/rtld.c that had no references to
getenv before.

The following patch fixes the linking problem by replacing __strncmp_ia32
with strncmp and removing __GI_strncmp in rtld-strncmp-c.os:

--- a/sysdeps/i386/i686/multiarch/strncmp-c.c
+++ b/sysdeps/i386/i686/multiarch/strncmp-c.c
@@ -1,4 +1,4 @@
-#ifdef SHARED
+#if defined SHARED && !defined NOT_IN_libc
 # define STRNCMP __strncmp_ia32
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name)  \


-- 
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.