This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A visibility patch for ELF/PPC
- To: Geoff Keating <geoffk at cygnus dot com>
- Subject: Re: A visibility patch for ELF/PPC
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Thu, 14 Sep 2000 22:38:13 -0700
- Cc: binutils at sourceware dot cygnus dot com, loewis at informatik dot hu-berlin dot de
- References: <20000819174857.A29121@valinux.com> <200009142159.OAA14671@geoffk.org>
On Thu, Sep 14, 2000 at 02:59:18PM -0700, Geoff Keating wrote:
> > Date: Sat, 19 Aug 2000 17:48:57 -0700
> > From: "H . J . Lu" <hjl@valinux.com>
> > Cc: loewis@informatik.hu-berlin.de
>
> > ELF/PPC needs this patch to pass "make check" in elf from glibc 2.1.92.
> > I don't know enough about ELF/PPC to be sure if it is 100% correct.
> > Any comments?
>
> There are three places in ppc_elf_relocate section where the test
> appears, and the patch changes one of them. I'm seeing what happens
> when I change all three now...
>
This is in my current binutils which Linux/PPC has been using.
H.J.
---
2000-08-23 H.J. Lu <hjl@gnu.org>
* elf32-ppc.c (ppc_elf_relocate_section): Symbols with the non
default visibility in DSO need relocation.
Index: elf32-ppc.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elf32-ppc.c,v
retrieving revision 1.1.1.11
retrieving revision 1.9
diff -u -p -r1.1.1.11 -r1.9
--- elf32-ppc.c 2000/07/20 03:27:53 1.1.1.11
+++ elf32-ppc.c 2000/08/23 15:50:22 1.9
@@ -3020,11 +3020,15 @@ ppc_elf_relocate_section (output_bfd, in
|| r_type == R_PPC_GOT16_HA)
&& elf_hash_table (info)->dynamic_sections_created
&& (! info->shared
- || (! info->symbolic && h->dynindx != -1)
+ || (! info->symbolic
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| (info->shared
- && ((! info->symbolic && h->dynindx != -1)
+ && ((! info->symbolic
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& ((input_section->flags & SEC_ALLOC) != 0