* elflink.c (elf_link_output_extsym): Set st_size to zero for
symbols from dynamic libraries.
+2008-07-22 Simon Baldwin <simonb@google.com>
+
+ * elflink.c (elf_link_output_extsym): Set st_size to zero for
+ symbols from dynamic libraries.
+
2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4424
sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
}
+ /* If this is a symbol defined in a dynamic library, don't use the
+ symbol size from the dynamic library. Relinking an executable
+ against a new library may introduce gratuitous changes in the
+ executable's symbols if we keep the size. */
+ if (sym.st_shndx == SHN_UNDEF
+ && !h->def_regular
+ && h->def_dynamic)
+ sym.st_size = 0;
+
/* If a non-weak symbol with non-default visibility is not defined
locally, it is a fatal error. */
if (! finfo->info->relocatable