summaryrefslogtreecommitdiffstats
path: root/gold/incremental.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-09-18 15:06:28 +0000
committerCary Coutant <ccoutant@google.com>2011-09-18 15:06:28 +0000
commitaa06ae28f116b4f99f0e3cb158e8542adfb65697 (patch)
treefc5428ce93efb13056497204586c4b8959335720 /gold/incremental.cc
parent3451853062d59da1ad23ecd872775ed22c8a0b85 (diff)
downloadppe42-binutils-aa06ae28f116b4f99f0e3cb158e8542adfb65697.tar.gz
ppe42-binutils-aa06ae28f116b4f99f0e3cb158e8542adfb65697.zip
* incremental.cc (can_incremental_update): New function.
* incremental.h (can_incremental_update): New function. * layout.cc (Layout::init_fixed_output_section): Call it. (Layout::make_output_section): Don't allow patch space in .eh_frame. * object.cc (Sized_relobj_file::do_layout): Call can_incremental_update.
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 4c4483d358..998c04df27 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>
OpenPOWER on IntegriCloud