This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: A patch for STV_PROTECTED


On Sun, May 21, 2000 at 04:57:30PM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@valinux.com> writes:
> 
> > This patch may not be 100% correct. But it passed all the visibility
> > tests in today's binutils from CVS.
> 
> Why do you assume the binutils tests are correct?  Send me a test case
> and I'll take a look.  I have no time looking at the binutils test
> suite.
> 

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.



H.J.
-----
2000-05-20  H.J. Lu  <hjl@gnu.org>

	* elflink.h (elf_link_output_extsym): Clear the visibility
	field for symbols not defined locally.

 Thu Jan 13 13:29:40 2000  H.J. Lu  <hjl@gnu.org>
 
 	* configure.in (AC_OUTPUT): Add ../binutils.spec.
Index: bfd/elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.26
diff -u -p -r1.26 elflink.h
--- bfd/elflink.h	2000/05/18 22:10:35	1.26
+++ bfd/elflink.h	2000/05/21 20:33:46
@@ -5089,6 +5089,11 @@ elf_link_output_extsym (h, data)
       sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
     }
 
+  /* 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);
+
   /* If this symbol should be put in the .dynsym section, then put it
      there now.  We have already know the symbol index.  We also fill
      in the entry in the .hash section.  */

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