aboutsummaryrefslogtreecommitdiff
path: root/gold/merge.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-07-01 22:05:01 +0000
committerIan Lance Taylor <ian@airs.com>2011-07-01 22:05:01 +0000
commit07a60597350488f098508ee67717d549a8a0b579 (patch)
tree2476e48897011f57f41615892bdffda825fde6b2 /gold/merge.cc
parenta931db6a07ac9ae2fec6c31c6d037716050292c5 (diff)
downloadgdb-07a60597350488f098508ee67717d549a8a0b579.zip
gdb-07a60597350488f098508ee67717d549a8a0b579.tar.gz
gdb-07a60597350488f098508ee67717d549a8a0b579.tar.bz2
PR gold/12571
* options.h (class General_options): Add --ld-generated-unwind-info. * ehframe.cc (Fde::write): Add address parameter. Change all callers. If associated with PLT, fill in address and size. (Cie::set_output_offset): Only add merge mapping if there is an object. (Cie::write): Add address parameter. Change all callers. (Eh_frame::add_ehframe_for_plt): New function. * ehframe.h (class Fde): Update declarations. Move shndx_ and input_offset_ fields into union u_, with new plt field. (Fde::Fde): Adjust for new union field. (Fde::Fde) [Output_data version]: New constructor. (Fde::add_mapping): Only add merge mapping if there is an object. (class Cie): Update declarations. (class Eh_frame): Declare add_ehframe_for_plt. * layout.cc (Layout::layout_eh_frame): Break out code into make_eh_frame_section, and call it. (Layout::make_eh_frame_section): New function. (Layout::add_eh_frame_for_plt): New function. * layout.h (class Layout): Update declarations. * merge.cc (Merge_map::add_mapping): Add assertion. * i386.cc: Include "dwarf.h". (class Output_data_plt_i386): Make first_plt_entry, dyn_first_plt_entry, exec_plt_entry, and dyn_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_i386::Output_data_plt_i386): Align to 16-byte boundary. Call add_eh_frame_for_plt if appropriate. * x86_64.cc: Include "dwarf.h". (class Output_data_plt_x86_64): Align to 16-byte boundary. Make first_plt_entry, plt_entry and tlsdesc_plt_entry const. Add plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie, and plt_eh_frame_fde. (Output_data_plt_x86_64::init): Call add_eh_frame_for_plt if appropriate.
Diffstat (limited to 'gold/merge.cc')
-rw-r--r--gold/merge.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/merge.cc b/gold/merge.cc
index 4fcbc10..093b6fc 100644
--- a/gold/merge.cc
+++ b/gold/merge.cc
@@ -1,6 +1,6 @@
// merge.cc -- handle section merging for gold
-// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -242,6 +242,7 @@ Merge_map::add_mapping(Relobj* object, unsigned int shndx,
section_offset_type offset, section_size_type length,
section_offset_type output_offset)
{
+ gold_assert(object != NULL);
Object_merge_map* object_merge_map = object->merge_map();
if (object_merge_map == NULL)
{