This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement --exclude-libs for ELF


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.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]