This is the mail archive of the
mailing list for the binutils project.
Re: Implement --exclude-libs for ELF
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Thu, 14 Oct 2004 23:02:31 +0930
- Subject: Re: Implement --exclude-libs for ELF
- References: <20041013163821.GA17695@nevyn.them.org>
On Wed, Oct 13, 2004 at 12:38:22PM -0400, Daniel Jacobowitz wrote:
> So I implemented --exclude-libs for ELF.
> + /* If this symbol has default visibility and the user has requested
> + we not re-export it, then mark it as hidden. */
> + if (definition && !dynamic
> + && (abfd->no_export
> + || (abfd->my_archive && abfd->my_archive->no_export))
> + && ELF_ST_VISIBILITY (isym->st_other) == STV_DEFAULT)
> + isym->st_other = STV_HIDDEN | (isym->st_other & ~ ELF_ST_VISIBILITY (-1));
No, don't test for STV_DEFAULT. As you have it, a protected symbol
will be exported. Make anything that isn't STV_INTERNAL (the most
constraining visibility) hidden. Otherwise looks OK.
IBM OzLabs - Linux Technology Centre