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

Re: Include lib

> > I can't make the images includes some nessecery shared libraries. It's a 
> > standard library (libdl) and it is copied to target/cris-axis-linux-gnu after 
> > a "make install". But when the "make images" is run, it will not include the 
> > library to the images. 
> > Please, anyone know how to make it work? 
> Does "make install" install a program that is linked to libdl
> and which is included in the "flashed" image?  If it does, then
> there's a bug in the installation procedure.  I'd need more
> details to proceed, so please come back if that's the case.
> If no program links to libdl, libdl won't be installed: DSOs
> (ELF shared libraries) that aren't linked to a program are
> excluded from the "flashed" root filesystem image.  There are
> exceptions for special DSOs that are known to only be loaded
> dynamically, like libnss_files.so.2 and libnss_dns.so.2.  (Note
> that these DSOs are loaded dynamically through functions in
> libc, not those in libdl, which may otherwise seem confusing
> since libdl wasn't included here!)
> If you want libdl.so.2 installed *without* installing any
> program linked to it (presumably useful during development, when
> uploading the program by other means), add it same way as those
> mentioned DSOs in the cramfs.img rule in the toplevel Makefile.
> brgds, H-P

Thanks for the reply!

You´r were right. I forgotten the -ldl switch to the linker. However, this did´t not work iver. Then the program using the library started there was a error message saying something like "BUG IN LIBRARY LD ..." and a referense to a funktion that I forgotten. However, the library ld included in the memmory images seems wery small so I added the library to the files directory in /usr/lib and removed the -ldl switch from the linker. Now it works! 
One question. How do I do static linking. Now, there are libraries installed used only by CSL and they are requiere ALOT of memmory. After the CSL is installd there are only a few bytes lefts and, correct me if  I am wrong, but will not static linking be better to use when there is only one program using a library?

/Per-Ola Svensson