Subject: toolchain/32713: ld.elf_so breaks with new bntools
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dogcow@babymeat.com>
List: netbsd-bugs
Date: 02/03/2006 01:20:00
>Number:         32713
>Category:       toolchain
>Synopsis:       ld.elf_so breaks with new bntools
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 03 01:20:00 +0000 2006
>Originator:     Tom Spindler
>Release:        NetBSD 3.99.15
>Organization:
	
>Environment:
	
	
FreeBSD marble.corp.yahoo.com 4.11-YAHOO-20050519 FreeBSD 4.11-YAHOO-20050519 #1: Tue Jul 19 16:17:23 PDT 2005     root@marble.corp.yahoo.com:/home/src/sys/compile/DESKTOP  i386
Architecture: i386
Machine: i386
>Description:
	
ld.elf_so is linked with the options
   -shared -symbolic -nostartfiles -Wl,-non_shared
The new binutils do not like this, with the following error:
 -static and -shared may not be used together

Presumably, non_shared is now treated differently with the newly imported
binutils.

>How-To-Repeat:
	
./build.sh
[lots of text]
#      link  ld.elf_so
/home/dogcow/work/nbsrc/../nbobj/tools/bin/i386--netbsdelf-gcc  -shared -symbolic -nostartfiles -Wl,-non_shared -Wl,-e,.rtld_start  -o ld.elf_so rtld_start.o mdreloc.o rtld.o reloc.o symbol.o malloc.o xmalloc.o xprintf.o debug.o map_object.o load.o search.o headers.o paths.o -L/home/dogcow/work/nbsrc/../nbobj/obj/home/dogcow/work/nbsrc/lib/libc -L/home/dogcow/work/nbsrc/../nbobj/dd/usr/lib -lc_pic 
/home/dogcow/work/nbobj/tools/bin/../lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld: -static and -shared may not be used together
collect2: ld returned 1 exit status

>Fix:
	
unknown. The change to add both -shared and -non_shared was in -r1.66 of
src/libexec/ld.elf_so/Makefile by uwe; prior to that,
'-Bshareable -Bsymbolic' was used.

>Unformatted: