From owner-freebsd-bugs Wed Jul 28 5:30:26 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9BF6A1547B for ; Wed, 28 Jul 1999 05:30:22 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA43503; Wed, 28 Jul 1999 05:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 1E45914BFE for ; Wed, 28 Jul 1999 05:25:42 -0700 (PDT) (envelope-from mikko@mt.dynas.se) Received: (qmail 57382 invoked from network); 28 Jul 1999 12:25:37 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.sto.dynas.se with SMTP; 28 Jul 1999 12:25:37 -0000 Received: from mt.dynas.se by spirit.dynas.se with smtp (Smail3.1.28.1 #32) id m119Sm9-000iTAC; Wed, 28 Jul 99 14:25:37 +0200 Received: (from mikko@localhost) by mt.dynas.se (8.9.3/8.9.3) id OAA27588; Wed, 28 Jul 1999 14:25:40 +0200 (CEST) (envelope-from mikko) Message-Id: <199907281225.OAA27588@mt.dynas.se> Date: Wed, 28 Jul 1999 14:25:40 +0200 (CEST) From: mikko@dynas.se Reply-To: mikko@dynas.se To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12849: Shared library version script gives warnings from rtld Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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