[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 ld.so) 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 http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer address@hidden, gcc.gnu.org}
Free Software Evangelist address@hidden, gnu.org}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Libtool API suggestion: LTDL_SHLIB_PRE and/or char* ltdl_map_shared_name(const char* name),
Alexandre Oliva <=