[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool API suggestion: LTDL_SHLIB_PRE and/or char* ltdl_map_shared_

From: Alexandre Oliva
Subject: Re: Libtool API suggestion: LTDL_SHLIB_PRE and/or char* ltdl_map_shared_name(const char* name)
Date: 08 Sep 2005 17:13:24 -0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

On Aug 23, 2005, Albert Chin <address@hidden> wrote:

>> [2] ltdl.c from HEAD:
>> 812               if (strncmp(p, "-l", 2) == 0)
>> 813                 {
>> 814                   size_t name_len = 3+ /* "lib" */ LT_STRLEN (p
>> + 2);
>> 815                   name = MALLOC (char, 1+ name_len);
>> 816                   if (name)
>> 817                     sprintf (name, "lib%s", p+2);
>> 818                 }

>> From inspection, this appears wrong. It doesn't honor
> $need_lib_prefix.

I don't think it should.  need_lib_prefix refers to whether dlopen et
al support loading libraries that don't start with lib.  It's
unrelated with what the linker (ld, not does with `-lname' to
find the library to link with, which is what ltdl.c is trying to do
here.  Prepending lib unconditionally here is the right thing to do,
unless the linker actually does something different.  I don't know of
any linker that searches for say foo.a when given -lfoo.

Alexandre Oliva
Red Hat Compiler Engineer   address@hidden,}
Free Software Evangelist  address@hidden,}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]