[LCP]3 questions...

Vincent Penquerc'h Vincent.Penquerch at artworks.co.uk
Thu Jul 24 21:25:02 UTC 2003


> 1> How to identify what library has been used in creating an 
> executable 
> from C source code using a command?

ldd (only works for shared objects, obviously). Works for any kind
of source code that creates ELF shared objects, probably works for
any kind of shared objects your system supports (eg COFF, etc).

> 2> If a shared library is moved, how to execute an executable program 
> (that uses shared library) without rebuilding it?

ln

> 3> What option gcc supports to generate a core file?

You mean, pass an option to GCC so that the resulting program
crashes ? Try playing with some optimization switches, and hope
the compiler will emit bad code :)
The core file is not generated by compiler emitted code (well,
technically, it is, but when the compiler compiled the kernel,
not your program). So you should not have to supply any cmdline
args to your build command.

Make sure the system is compiled with core files on, some may
not be (if disk space is important on a production machine).

Check core size limits: ulimit (bash), limit (IIRC) (csh).

Check in the paths your program may have set as working directory.

Check the filesystem you're on is writeable and has enough free
space :)

-- 
Vincent Penquerc'h 



More information about the linuxCprogramming mailing list