aboutsummaryrefslogtreecommitdiff
path: root/gold/output.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-06-08 04:05:25 +0000
committerCary Coutant <ccoutant@google.com>2011-06-08 04:05:25 +0000
commit5146f4485680b0029143c2e17bf5393dd4b89792 (patch)
tree8f95099e332a5f4d6183d8673536c96e1b8d0897 /gold/output.cc
parent26d3c67de1d0e6434dabb908e5a6fa002f5b1db8 (diff)
downloadgdb-5146f4485680b0029143c2e17bf5393dd4b89792.zip
gdb-5146f4485680b0029143c2e17bf5393dd4b89792.tar.gz
gdb-5146f4485680b0029143c2e17bf5393dd4b89792.tar.bz2
* common.cc (Symbol_table::do_allocate_commons_list): For incremental
update, allocate common from bss section's free list. * incremental-dump.cc (dump_incremental_inputs): Print flag for linker-defined symbols. * incremental.cc (Sized_incremental_binary::do_process_got_plt): Skip GOT and PLT entries that are no longer referenced. (Output_section_incremental_inputs::write_info_blocks): Mark linker-defined symbols. (Sized_incr_relobj::do_add_symbols): Process linker-defined symbols. * output.cc (Output_section::allocate): New function. * output.h (Output_section::allocate): New function. * resolve.cc (Symbol_table::report_resolve_problem): Add case for linker-defined symbols. (Symbol::override_base_with_special): Copy is_predefined_ flag. * symtab.cc (Symbol::init_fields): Initialize is_predefined_ flag. (Symbol::init_base_output_data): Likewise. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Sized_symbol::init_output_data): Likewise. (Sized_symbol::init_output_segment): Likewise. (Sized_symbol::init_constant): Likewise. (Symbol_table::do_define_in_output_data): Likewise. (Symbol_table::do_define_in_output_segment): Likewise. (Symbol_table::do_define_as_constant): Likewise. * symtab.h (Symbol::is_predefined): New function. (Symbol::init_base_output_data): Add is_predefined parameter. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Symbol::is_predefined_): New data member. (Sized_symbol::init_output_data): Add is_predefined parameter. (Sized_symbol::init_output_segment): Likewise. (Sized_symbol::init_constant): Likewise. (enum Symbol_table::Defined): Add INCREMENTAL_BASE.
Diffstat (limited to 'gold/output.cc')
-rw-r--r--gold/output.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/output.cc b/gold/output.cc
index 3f6cb70..0134d33 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -3726,12 +3726,22 @@ Output_section::set_fixed_layout(uint64_t sh_addr, off_t sh_offset,
// Reserve space within the fixed layout for the section. Used for
// incremental update links.
+
void
Output_section::reserve(uint64_t sh_offset, uint64_t sh_size)
{
this->free_list_.remove(sh_offset, sh_offset + sh_size);
}
+// Allocate space from the free list for the section. Used for
+// incremental update links.
+
+off_t
+Output_section::allocate(off_t len, uint64_t addralign)
+{
+ return this->free_list_.allocate(len, addralign, 0);
+}
+
// Output segment methods.
Output_segment::Output_segment(elfcpp::Elf_Word type, elfcpp::Elf_Word flags)