[uClibc] uClibc-0.9.24: ldd/ldconfig build errors

Charlie Brady charlieb-uclibc at e-smith.com
Thu Dec 25 00:17:42 UTC 2003


On Wed, 24 Dec 2003, Charlie Brady wrote:

> I can see what Erik means about ld's stubbornness in searching "standard 
> locations":
> 
> ...
>  /usr/lib/gcc-lib/i386-redhat-linux/3.3.2/collect2 --eh-frame-hdr -m 
> elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ldd -L../lib 
> -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.2 
> -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/../../.. -s /tmp/ccMA7xvF.o 
> /usr/i386-linux-uclibc/usr/lib/crt0.o -lc -verbose -nostdlib
> ...
> ENTRY(_start)
> SEARCH_DIR("/usr/i386-redhat-linux/lib"); SEARCH_DIR("/usr/lib"); 
> SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib");
> ...

This looks to be misleading. ld goes through the motions of adding 
elements to the search path, including, it seems, printing out the above, 
but the library is not added to the search path. Notice that this 
function because a no-op if "cmdline" is true, and -nostdlib is set:

void
ldfile_add_library_path (name, cmdline)
     const char *name;
     boolean cmdline;
{
  search_dirs_type *new;
                                                                                                                            
  if (!cmdline && config.only_cmd_line_lib_dirs)
    return;
                                                                                                                            
  new = (search_dirs_type *) xmalloc (sizeof (search_dirs_type));
  new->next = NULL;
  new->name = name;
  new->cmdline = cmdline;
  *search_tail_ptr = new;
  search_tail_ptr = &new->next;
}

--
Charlie




More information about the uClibc mailing list