This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld bug?
- To: Vassili Karpov <av1474 at comtv dot ru>
- Subject: Re: ld bug?
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Tue, 30 Oct 2001 23:30:13 -0800
- Cc: binutils at sources dot redhat dot com
- References: <20011030013604.06bd2dc2.av1474@comtv.ru>
On Tue, Oct 30, 2001 at 01:36:04AM +0300, Vassili Karpov wrote:
> LD discards ELF visibility attributes when making relocateable objects.
>
> Example:
> a.s
> ==
> .protected symbol
>
> b.s
> ==
> dummy:
> ---
> as -o a.o a.s
> as -o b.o b.s
> ld -r -o c.o a.o b.o
>
> a.o: 4: 00000000 0 NOTYPE GLOBAL PROTECTED UND symbol
> c.o: 8: 00000000 0 NOTYPE GLOBAL DEFAULT UND symbol
> --
It is ok since symbol is undefined. There is no such a thing as
protected, undefined symbol.
H.J.