This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gcc and -fPIC
On Tue, Oct 19, 2004 at 03:40:05PM +0200, Andreas Schwab wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
>
> > On Mon, Oct 18, 2004 at 10:11:50PM +0200, Andreas Schwab wrote:
> >> - addr = bed->plt_sym_val (i, plt, p);
> >> + addr = bed->plt_sym_val (abfd, i, plt, p);
> >
> > There's no need to pass abfd here. You can use plt->owner in your
> > target function.
>
> Hmm, I tried that first and got a segfault, but I can't reproduce that any
> more.
The only sections that can't use "owner" to access their bfd are
bfd_{abs,und,com,ind}_section. (Which is a bfd design bug IMO. See the
comment in struct bfd_symbol.)
> 2004-10-19 Andreas Schwab <schwab@suse.de>
>
> * elf32-m68k.c (elf_m68k_plt_sym_val): New fuction.
> (elf_backend_plt_sym_val): Define.
OK, thanks.
--
Alan Modra
IBM OzLabs - Linux Technology Centre