This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
A patch for ELF visibility.
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: A patch for ELF visibility.
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Mon, 22 May 2000 00:28:01 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <20000521171657.A8394@valinux.com> <m31z2vjw2d.fsf@localhost.localnet> <20000521174601.B8654@valinux.com> <m3bt1zhyy7.fsf@localhost.localnet>
On Sun, May 21, 2000 at 11:38:08PM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@valinux.com> writes:
>
> > You may also need this patch against binutils in CVS to get it
> > to work. I am waiting for feedbacks before I check it in.
>
> A patch like this is necessary in any case. I would write it like this:
>
> /* If a symbol is not defined locally, we clear the visibility
> field. */
> if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
> sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
>
> Saves an instructions or two.
>
Thanks. I checked it in.
H.J.