A patch for visibility.
H . J . Lu
hjl@valinux.com
Fri May 19 13:07:00 GMT 2000
Martin,
I believe we should clear the visibility field for undefined symbols.
What do you think?
--
H.J. Lu (hjl@gnu.org)
---
2000-05-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_output_extsym): Clear the visibility
field for undefined symbols.
Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.26
diff -u -p -r1.26 elflink.h
--- elflink.h 2000/05/18 22:10:35 1.26
+++ elflink.h 2000/05/19 20:03:33
@@ -5089,6 +5089,10 @@ elf_link_output_extsym (h, data)
sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
}
+ /* If a symbol is undefined, we clear the visibility field. */
+ if (sym.st_shndx == SHN_UNDEF)
+ 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. */
More information about the Binutils
mailing list