summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold/object.cc
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-12-09 17:57:18 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-12-09 19:50:14 +0800
commit5e8c1cf25beccac1d22d10dc866912394f42771b (patch)
treeee16b70f804484dc8e434e647e699ab50da2620f /binutils-2.25/gold/object.cc
parent8eebd7953384e6662ca926b003f2cdda8ccd3ee5 (diff)
downloadtoolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.zip
toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.gz
toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.bz2
[2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6
local patches will be re-applied later commit a30720e3e633f275250e26f85ccae5dbdddfb6c6 Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 19 10:30:16 2014 +1030 daily update Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab
Diffstat (limited to 'binutils-2.25/gold/object.cc')
-rw-r--r--binutils-2.25/gold/object.cc25
1 files changed, 19 insertions, 6 deletions
diff --git a/binutils-2.25/gold/object.cc b/binutils-2.25/gold/object.cc
index b1feacc..6ab84ce 100644
--- a/binutils-2.25/gold/object.cc
+++ b/binutils-2.25/gold/object.cc
@@ -1,7 +1,6 @@
// object.cc -- support for an object file for linking in gold
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
-// Free Software Foundation, Inc.
+// Copyright (C) 2006-2014 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -335,7 +334,9 @@ Relobj::is_section_name_included(const char* name)
|| (is_prefix_of(".sdata", name)
&& strstr(name, "personality"))
|| (is_prefix_of(".gnu.linkonce.d", name)
- && strstr(name, "personality")))
+ && strstr(name, "personality"))
+ || (is_prefix_of(".rodata", name)
+ && strstr(name, "nptl_version")))
{
return true;
}
@@ -756,6 +757,16 @@ template<int size, bool big_endian>
void
Sized_relobj_file<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
{
+ this->base_read_symbols(sd);
+}
+
+// Read the sections and symbols from an object file. This is common
+// code for all target-specific overrides of do_read_symbols().
+
+template<int size, bool big_endian>
+void
+Sized_relobj_file<size, big_endian>::base_read_symbols(Read_symbols_data* sd)
+{
this->read_section_data(&this->elf_file_, sd);
const unsigned char* const pshdrs = sd->section_headers->data();
@@ -1633,7 +1644,7 @@ Sized_relobj_file<size, big_endian>::do_layout(Symbol_table* symtab,
symtab->icf()->get_folded_section(this, i);
Relobj* folded_obj =
reinterpret_cast<Relobj*>(folded.first);
- gold_info(_("%s: ICF folding section '%s' in file '%s'"
+ gold_info(_("%s: ICF folding section '%s' in file '%s' "
"into '%s' in file '%s'"),
program_name, this->section_name(i).c_str(),
this->name().c_str(),
@@ -1849,7 +1860,7 @@ Sized_relobj_file<size, big_endian>::do_layout_deferred_sections(Layout* layout)
// Reading the symbols again here may be slow.
Read_symbols_data sd;
- this->read_symbols(&sd);
+ this->base_read_symbols(&sd);
this->layout_eh_frame_section(layout,
sd.symbols->data(),
sd.symbols_size,
@@ -2348,7 +2359,9 @@ Sized_relobj_file<size, big_endian>::compute_final_local_value_internal(
lv_out->set_merged_symbol_value(msv);
}
}
- else if (lv_in->is_tls_symbol())
+ else if (lv_in->is_tls_symbol()
+ || (lv_in->is_section_symbol()
+ && (os->flags() & elfcpp::SHF_TLS)))
lv_out->set_output_value(os->tls_offset()
+ secoffset
+ lv_in->input_value());