Sorry, this is a beginners question, but is there a reference document
for the libraries and issues involved with linking GCC created objects
with ld ? The GCC manual does not say anything about it, and "man ld"
was of not much help, either. Specifically, I have the following
- which is the correct startup code ? I find on my system
/usr/lib/bcc/crt0.o, /usr/lib/crt1.o, /usr/lib/crti.o,
/usr/lib/crtn.o, plus suspiciously named crtbegin.o.
- are there runtime libs made specifically for multithreaded programs
? on other OS, you have to link special libraries if your code is
multithreaded, because of the synchronisation issues involved (e.g.
accessing strtok() from two threads and things like that), or will
libg++.so do for all kinds of targets ?
- Is there a tool that will check dynamically loaded libraries for
their existence and location ? (e.g. CHKDLL32 on OS/2, DEPENDS on NT)
- what goes wrong if ld creates an executable ("test") with
/usr/lib/crt1.o without complaining, and when I start it using ./test
I will get
bash: ./test: No such file or directory
when I try "file", I get
file: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically
linked (uses shared libraries), not stripped