Date: Thu, 22 Oct 1998 16:51:14 -0700 (PDT) From: Jin Guojun (FTG staff) <jin@george.lbl.gov> To: mike@smith.net.au Cc: hackers@FreeBSD.ORG, jdp@FreeBSD.ORG Subject: Re: ld for loading dynamic library changed in 3.0-RELEASE? Message-ID: <199810222351.QAA08906@george.lbl.gov>
next in thread | raw e-mail | index | archive | help
> Ok, you should set OBJFORMAT=aout in the environment to get the "right" > behaviour. It would be useful to know if this works. Yup, this may be a solution. Not set but setenv works. test.lbl.gov: set OBJFORMAT=aout test.lbl.gov: make test.lbl.gov: file *o a.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped a.so: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped b.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped b.so: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped c.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped c.so: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped test.lbl.gov: !cc cc -o test test.c -ltest /usr/libexec/elf/ld: cannot open -ltest: No such file or directory test.lbl.gov: cc -o test test.c -L/usr/local/lib -ltest /usr/local/lib/libtest.so: undefined reference to `b_printf' /usr/local/lib/libtest.so: undefined reference to `c_printf' test.lbl.gov: setenv OBJFORMAT aout test.lbl.gov: make ... test.lbl.gov: !fil file *o a.o: FreeBSD/i386 object not stripped a.so: FreeBSD/i386 PIC object not stripped b.o: FreeBSD/i386 object not stripped b.so: FreeBSD/i386 PIC object not stripped c.o: FreeBSD/i386 object not stripped c.so: FreeBSD/i386 PIC object not stripped test.lbl.gov: cc -o test test.c -ltest test.lbl.gov: > > Also, I just found another problem for elf/ld that does not use ENV > > variable LD_LIBRARY_PATH. If -Lsomething is not specified, the elf/ld > > just look at /usr/lib, regardless what LD_LIBRARY_PATH set to. > > Unless I'm mistake, LD_LIBRARY_PATH is a runtime, not linktime > parameter. Again, we're using the standard binutils linker, so > behaviour here should be "standard". It is used for both but generally for linktime that is why ldd can report the paths for any user. -Jin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810222351.QAA08906>
