This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Please comment: A patch for elf32-i386.c
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: Please comment: A patch for elf32-i386.c
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 9 Feb 2001 13:53:18 +1100 (EST)
- cc: binutils at sourceware dot cygnus dot com
On Thu, 8 Feb 2001, H . J . Lu wrote:
> Alan, how can
> I use elf_i386_discard_copies to do that? Why is there
>
> if (h != NULL
> && ELF32_R_TYPE (rel->r_info) == R_386_PC32)
>
> for using the pcrel_relocs_copied field?
I think it's there mainly just to cut down the number of relocs that use
pcrel_relocs_copied. I see no reason why you can't use
pcrel_relocs_copied for other relocs (I do exactly that in elf32-hppa.c),
but I suggest you only use it as necessary and rename the field to plain
"relocs_copied" to avoid confusion. Just be carefull with the conditions
you add in elf_i386_discard_copies and elf_i386_relocate_section. It's a
little tricky to get right.
Alan
--
Linuxcare. Support for the Revolution.