diff options
author | Cary Coutant <ccoutant@google.com> | 2011-09-18 15:06:28 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2011-09-18 15:06:28 +0000 |
commit | aa06ae28f116b4f99f0e3cb158e8542adfb65697 (patch) | |
tree | fc5428ce93efb13056497204586c4b8959335720 /gold/layout.cc | |
parent | 3451853062d59da1ad23ecd872775ed22c8a0b85 (diff) | |
download | binutils-gdb-aa06ae28f116b4f99f0e3cb158e8542adfb65697.tar.gz |
* 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/layout.cc')
-rw-r--r-- | gold/layout.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index afb5b6af041..1c32bcfd06e 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -898,11 +898,10 @@ Layout::init_fixed_output_section(const char* name, { unsigned int sh_type = shdr.get_sh_type(); - // We preserve the layout of PROGBITS, NOBITS, and NOTE sections. + // We preserve the layout of PROGBITS, NOBITS, INIT_ARRAY, FINI_ARRAY, + // PRE_INIT_ARRAY, and NOTE sections. // All others will be created from scratch and reallocated. - if (sh_type != elfcpp::SHT_PROGBITS - && sh_type != elfcpp::SHT_NOBITS - && sh_type != elfcpp::SHT_NOTE) + if (!can_incremental_update(sh_type)) return NULL; typename elfcpp::Elf_types<size>::Elf_Addr sh_addr = shdr.get_sh_addr(); @@ -1442,6 +1441,7 @@ Layout::make_output_section(const char* name, elfcpp::Elf_Word type, && order != ORDER_FINI && order != ORDER_RELRO_LAST && order != ORDER_NON_RELRO_FIRST + && strcmp(name, ".eh_frame") != 0 && strcmp(name, ".ctors") != 0 && strcmp(name, ".dtors") != 0 && strcmp(name, ".jcr") != 0) |