aboutsummaryrefslogtreecommitdiff
path: root/gold/incremental.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r--gold/incremental.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc
index 4c4483d..998c04d 100644
--- a/gold/incremental.cc
+++ b/gold/incremental.cc
@@ -161,6 +161,22 @@ Incremental_binary::error(const char* format, ...) const
va_end(args);
}
+// Return TRUE if a section of type SH_TYPE will can be updated in place
+// during an incremental update. We can update sections of type PROGBITS,
+// NOBITS, INIT_ARRAY, FINI_ARRAY, PREINIT_ARRAY, and NOTE. All others
+// will be regenerated.
+
+bool
+can_incremental_update(unsigned int sh_type)
+{
+ return (sh_type == elfcpp::SHT_PROGBITS
+ || sh_type == elfcpp::SHT_NOBITS
+ || sh_type == elfcpp::SHT_INIT_ARRAY
+ || sh_type == elfcpp::SHT_FINI_ARRAY
+ || sh_type == elfcpp::SHT_PREINIT_ARRAY
+ || sh_type == elfcpp::SHT_NOTE);
+}
+
// Find the .gnu_incremental_inputs section and related sections.
template<int size, bool big_endian>