Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 1995 01:02:33 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        amjudge@dsg.cs.tcd.ie, hackers@FreeBSD.org
Subject:   Re: gcc 2.7.0 and FreeBSD 2.0.5
Message-ID:  <199506231502.BAA13731@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



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