[parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?

John David Anglin dave@hiauly1.hia.nrc.ca
Mon, 2 Jun 2003 17:10:38 -0400 (EDT)


> On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > : undefined reference to `foo'
> 
> This should fix it.  Would someone mind applying it for me?  I'm in
> transit at the moment and internet access is slow and flaky.  2.14
> branch too, I guess.
> 
> 	* elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
> 	undefined_symbol call.

I'm not fully up to speed on this but there still appear to be problems
with undefined symbols in shared libraries:

gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2  -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2  -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh1.c -o tmpdir/sh1p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2  -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2  -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh2.c -o tmpdir/sh2p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -B/home/dave/binutils-2.14.90/objdir
/ld/tmpdir/ld/ -L/home/dave/opt/gnu/hppa-linux/lib -L/home/dave/opt/gnu/lib -L/u
sr/local/lib -L/lib -L/usr/lib  -o tmpdir/vp.so -shared  tmpdir/sh1p.o tmpdir/sh
2p.o
tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
/home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
ence to `mainvar'
...
FAIL: visibility (hidden)

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)