Date: Thu, 03 Apr 1997 10:14:32 -0800 From: John Polstra <jdp@polstra.com> To: nnd@info.itfs.nsk.su Cc: hackers@freebsd.org Subject: Re: FreeBSD Elf-Kit and dynamic loading Message-ID: <199704031814.KAA17009@austin.polstra.com> In-Reply-To: <5i0j1d$jtk@news.itfs.nsk.su> References: <5i0j1d$jtk@news.itfs.nsk.su>
index | next in thread | previous in thread | raw e-mail
In article <5i0j1d$jtk@news.itfs.nsk.su>,
Nickolay N. Dudorov <nnd@info.itfs.nsk.su> wrote:
> Today I try to install ELF-Kit on my 2.2-RELEASE
> system. I can succesfully (?) build binutils-2.7, gcc-2.7.2.1,
> almost all libraries from /usr/src/lib and libg++-2.7.2.
>
> After that I can test elf-cc and elf-g++ on
> provided in kit hello.c and hello.cc - AND they works.
>
> And after that I discovered that 'file hello'
> says:
> hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD)
ElfKit _should_ be producing dynamically linked executables.
Hmm ... Except on FreeBSD-current, the "file" command does not report
whether an ELF file is dynamically linked or not. For example, on a
dynamically-linked ELF file "hello", the -2.2 "file" command says:
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD)
The same command on a -current system says:
hello: ELF 32-bit LSB executable, Intel 80386, version 1
(FreeBSD), dynamically linked, not stripped
(on a single line).
At first, I thought you had a dynamically linked program but did not
realize it. But ...
> and file 'hello' is 47761 bytes long.
>
> So, there is a question - is there any possibility to
> build "dynamic ELF" program ? My elf-gcc produce identical results
> with and without '-static' flag.
47761 bytes is much too large (my "hello" is only 4121 bytes even
before stripping it). So I think you really are getting a statically
linked executable, for some reason.
Are you sure your ELF shared libc is installed properly? You should
have this in /usr/local/elf/i386-unknown-freebsdelf/lib:
lrwxr-xr-x 1 root bin 9 Apr 16 1996 libc.so -> libc.so.3
-rwxr-xr-x 1 root bin 404921 Apr 15 1996 libc.so.3
If that looks OK, then please run the following command, and send me
the output it produces:
elf-cc -v -o hello hello.c
Thanks,
John
--
John Polstra jdp@polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Self-knowledge is always bad news." -- John Barth
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704031814.KAA17009>
