I put crt1S.o and interp.o in /usr/lib ... that's the location of crt1.o.
- Code: Select all
laptop lib $ ls -l crt* interp.o
-rw-r--r-- 1 root root 1136 Jan 8 13:01 crt1.o
-rw-r--r-- 1 root root 1064 Mar 13 05:15 crt1S.o
-rw-r--r-- 1 root root 1888 Jan 8 13:01 crti.o
-rw-r--r-- 1 root root 1456 Jan 8 13:01 crtn.o
-rw-r--r-- 1 root root 807 Mar 13 05:15 interp.o
Here is the result when I run gcc against the hello world a.c that comes with the et_dyn.zip:
- Code: Select all
laptop linux $ gcc -shared -et_dyn a.c
a.c:9:2: warning: no newline at end of file
collect2: no arguments
laptop linux $ gcc a.c
a.c:9:2: warning: no newline at end of file
collect2: no arguments
laptop linux $ ls
Makefile README a.c crt1S.S crt1S.o interp.c interp.o
Here it is with the old specs file:
- Code: Select all
laptop linux $ gcc -shared -et_dyn a.c
a.c:9:2: warning: no newline at end of file
laptop linux $ ./a.out
Segmentation fault
laptop linux $ gcc a.c
a.c:9:2: warning: no newline at end of file
laptop linux $ ./a.out
hello world
Here is gcc -v:
- Code: Select all
laptop linux $ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/specs
Configured with: /var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.2
What does --enable-shared do? It's strange that it is in there twice.
Thanks,
meekrob