From owner-freebsd-hackers Fri Jun 23 08:17:06 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id IAA10190 for hackers-outgoing; Fri, 23 Jun 1995 08:17:06 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id IAA10179 for ; Fri, 23 Jun 1995 08:16:54 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id BAA13731; Sat, 24 Jun 1995 01:02:33 +1000 Date: Sat, 24 Jun 1995 01:02:33 +1000 From: Bruce Evans Message-Id: <199506231502.BAA13731@godzilla.zeta.org.au> To: amjudge@dsg.cs.tcd.ie, hackers@FreeBSD.org Subject: Re: gcc 2.7.0 and FreeBSD 2.0.5 Sender: hackers-owner@FreeBSD.org Precedence: bulk >However, when I try to compile a simple C++ program, the >assembler complains about the use of the .weak pseudo-op. I thought >this might just be a limitation in the assembler, so I hacked up a >freebsd config for binutils-2.5.2 and compiled up the assembler there. >This got me past the .weak problem and even works for simple programs. I removed ASM_WEAKEN_LABEL() from gcc-2.7.0/config/i386/freebsd.h. SUpport for weak symbols seems to be optional (it is only provided for i386/osfrose, m88k, netbsd and svr4). >However, when I try with a more complex program (basically any >multimodule program where a .weak symbol appears more than once, I >think), I get errors of the form: >ld: /var/tmp/cc0019921.o: unexpected multiple definitions of symbol `_f__1X', type 0xf >:1: Definition of symbol `_f__1X' (multiply defined) >I guess that the FreeBSD ld doesn't fully support weak symbols? Weak symbols have stab numbers N_WEAKU=0xd to N_WEAKB=0x11 (see binutils/gas/config/aout_gnu.h). Old ld's don't support these. Bruce