Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 1999 14:25:40 +0200 (CEST)
From:      mikko@dynas.se
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12849: Shared library version script gives warnings from rtld
Message-ID:  <199907281225.OAA27588@mt.dynas.se>

next in thread | raw e-mail | index | archive | help

>Number:         12849
>Category:       bin
>Synopsis:       Shared library version script gives warnings from rtld
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 28 05:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mikko Työläjärvi
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
-
>Environment:

FreeBSD i386 4.0-CURRENT (July 26, 1999)
GNU ld version 2.9.1 (with BFD 2.9.1)
egcs-2.91.66

Also:

FreeBSD i386 3.1-STABLE (Mar 8, 1999)
GNU ld version 2.9.1 (with BFD 2.9.1)
gcc 2.7.2.1

And also:

FreeBSD 3.2-STABLE (May 19, 1999)
GNU ld version 2.9.1 (with BFD 2.9.1)
gcc 2.7.2.1


>Description:

When creating shared libs using version scripts (the --version-script
flag to "ld"), I get warning messages on stdout, presumably from
"rtld-elf", about unsupported "d_tag".

The purpose of using the version script is to limit the number of
externally visible symbols in the lib, but even an almost empty
version script gives this result.

The offending tags seem to be in the range (in hex) 6FFFFFF[0-F]

I have no idea whether the problem lies with rtld or ld, or simply
is a user error.  Programs seem to run ok, though.  For example:

LD_LIBRARY_PATH=. ./program
Ignored d_tag 1879048190
Ignored d_tag 1879048191
Ignored d_tag 1879048176
Ignored d_tag 1879048188
Ignored d_tag 1879048189
Ignored d_tag 1879048176
In main
...


>How-To-Repeat:

Put this makefile in an otherwise empty directory, and run make.  That
should produce a minimal shared lib and a minimal program linked
against it, as well as run the program to show the diagnostics.

"make clean; make NOVERSION=yes" repeats the operation, but without
the version script and without diagnostics from rtld.

---8<--Makefile --------------------------------------------------------------
.ifndef NOVERSION
LD_FLAGS = -Wl,--version-script=version
.endif

CFLAGS = -fpic
OTHERLIBS = -lc

program: program.o
	$(CC) -o $@ $? -L. -lxxx
	LD_LIBRARY_PATH=. ./program

program: libxxx.so

program.c: mkfunc.sh
	sh mkfunc.sh main entry > $@

libxxx.so: libxxx.so.1
	ln -sf $? $@

libxxx.so.1: f.o version
	cc -shared -o $@ -Wl,-soname,$@ f.o $(LD_FLAGS) $(OTHERLIBS)

f.c: mkfunc.sh
	sh mkfunc.sh entry > $@

version:
	echo 'V_1.0 { global: entry; local: *; };' > $@

mkfunc.sh:
	(echo 'echo -n "int $$1() { puts(\"In $$1\");"; shift;';\
	 echo 'for i in $$*; do echo -n "$$i();"; done';\
	 echo 'echo "return 0; }";'; ) > mkfunc.sh

clean:
	rm -f *.c *.o *.a *.so *.so.? program version mkfunc.sh *.core
---8<----------------------------------------------------------------------


>Fix:
	
Ask an ELF guru...?


>Release-Note:
>Audit-Trail:
>Unformatted:


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




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