This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: The static linking with -fPIC is broken now
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: The static linking with -fPIC is broken now
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 20 Jun 2001 18:25:52 +0930
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010620000130.A4734@lucon.org> <20010620011652.A5670@lucon.org>
On Wed, Jun 20, 2001 at 01:16:52AM -0700, H . J . Lu wrote:
>
> What happens if h->got.refcount > 0 and s->_raw_size == 0? When it does
See elflink.c:_bfd_elf_create_got_section. The .got starts off with
space allocated for the reserved entries.
> h->got.offset = s->_raw_size;
>
> it sets
>
> h->got.refcount = 0;
so this shouldn't be happening. In any case, got.offset == 0 is an
OK value, at least for targets that don't reserve .got space.
> It happens on the bad relocation in anaconda. As the result, I got
> a global data symbol instead of a pointer to a static function.
Is the relocation sym local or global? Any special visibility, or
other unusual flags? I need some clues if I'm to help.
Alan