* gold/incremental.cc
authorCary Coutant <ccoutant@google.com>
Wed, 6 Jul 2011 22:26:37 +0000 (22:26 +0000)
committerCary Coutant <ccoutant@google.com>
Wed, 6 Jul 2011 22:26:37 +0000 (22:26 +0000)
(Output_section_incremental_inputs::write_info_blocks): Check for
hidden and internal symbols.

gold/ChangeLog
gold/incremental.cc

index 192d6f6a0feae0a809eea1464c59d514be498602..52833b67fcfd37a5954c6da17ae02df353319a0a 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-06  Cary Coutant  <ccoutant@google.com>
+
+       * gold/incremental.cc
+       (Output_section_incremental_inputs::write_info_blocks): Check for
+       hidden and internal symbols.
+
 2011-07-06  Cary Coutant  <ccoutant@google.com>
 
        * incremental.cc (Sized_incremental_binary::do_file_has_changed):
index 710effc35149791bcadd74450c8126ba036c836e..cb97044a3d87f3a43be1677b58b7ce1ba44a66a9 100644 (file)
@@ -1669,9 +1669,15 @@ Output_section_incremental_inputs<size, big_endian>::write_info_blocks(
                if (sym->symtab_index() == -1U)
                  continue;
                unsigned int flags = 0;
-               if (sym->source() == Symbol::FROM_OBJECT
-                   && sym->object() == obj
-                   && sym->is_defined())
+               // If the symbol has hidden or internal visibility, we
+               // mark it as defined in the shared object so we don't
+               // try to resolve it during an incremental update.
+               if (sym->visibility() == elfcpp::STV_HIDDEN
+                   || sym->visibility() == elfcpp::STV_INTERNAL)
+                 flags = INCREMENTAL_SHLIB_SYM_DEF;
+               else if (sym->source() == Symbol::FROM_OBJECT
+                        && sym->object() == obj
+                        && sym->is_defined())
                  flags = INCREMENTAL_SHLIB_SYM_DEF;
                else if (sym->is_copied_from_dynobj()
                         && this->symtab_->get_copy_source(sym) == dynobj)
This page took 0.055295 seconds and 4 git commands to generate.