Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2002 23:55:37 -0500 (EST)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Jake Burkholder <jake@FreeBSD.org>
Cc:        sparc@FreeBSD.org
Subject:   cvs commit: src/libexec/rtld-elf/sparc64 Makefile.inc lockdflt.c reloc.c rtld_machdep.h rtld_start.S
Message-ID:  <200203130455.g2D4tbR64388@khavrinen.lcs.mit.edu>
In-Reply-To: <200203130240.g2D2eeb60194@freefall.freebsd.org>
References:  <200203130240.g2D2eeb60194@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 12 Mar 2002 18:40:40 -0800 (PST), Jake Burkholder <jake@FreeBSD.org> said:

>   rtld support for sparc64.
  
Is this the same as the code in the last snapshot?  I'm still have
very strange behavior on my Ultra5, and I think it's a bug in rtld.

I originally ended up down this path when I noticed that the configure
script for GNU make was hanging; I determined that by removing -lintl
from the command line, things would proceed normally.  Then I went
over to gettext, and ran *its* regression tests, and found that things
were no better over there.  Since gettext uses libtool, I then backed
up to libtool itself and found the tests failing.

I made a trivial shared library the non-libtool way, and suspect that
RPATH processing is broken.  Watch:

wollman@tsornin(66)$ sh demo.sh
cc -O -o baz.o -c baz.c
cc -O -o libbaz.o -c libbaz.c
cc -O -fPIC -o libbaz.So -c libbaz.c
ar cru libbaz.a libbaz.o
ranlib libbaz.a
cc -static -o baz.static baz.o -L. -lbaz
./baz.static
cc -shared -o libbaz.so.1 -Wl,-soname -Wl,libbaz.so.1
ln -s libbaz.so.1 libbaz.so
cc -o baz.shared baz.o -L. -Wl,-rpath -Wl,/usr/home/wollman/test -lbaz
Next command will hang...
./baz.shared
^C

Here is a shar file with the trivial programs and the test script:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       baz.c
#       libbaz.c
#       demo.sh
#
echo x - baz.c
sed 's/^X//' >baz.c << 'END-of-baz.c'
Xint
Xmain(void)
X{
X       return 0;
X}
END-of-baz.c
echo x - libbaz.c
sed 's/^X//' >libbaz.c << 'END-of-libbaz.c'
Xint baz(void) { return 19721222; }
END-of-libbaz.c
echo x - demo.sh
sed 's/^X//' >demo.sh << 'END-of-demo.sh'
X#!/bin/sh
X
Xset -e
Xsay() {
X       echo "$@"
X       $@
X}
X
Xsay cc -O -o baz.o -c baz.c
Xsay cc -O -o libbaz.o -c libbaz.c
Xsay cc -O -fPIC -o libbaz.So -c libbaz.c
Xsay ar cru libbaz.a libbaz.o
Xsay ranlib libbaz.a
X
X: testing static baz
Xsay cc -static -o baz.static baz.o -L. -lbaz
Xsay ./baz.static
X
X: testing dynamic baz
Xsay cc -shared -o libbaz.so.1 -Wl,-soname -Wl,libbaz.so.1
Xsay ln -s libbaz.so.1 libbaz.so
Xsay cc -o baz.shared baz.o -L. -Wl,-rpath -Wl,$(pwd) -lbaz
Xecho "Next command will hang..."
Xsay ./baz.shared
Xexit 0
END-of-demo.sh
exit


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203130455.g2D4tbR64388>