Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: binutils/gold/i386.cc

Issue 3018030: [binutils] Bump binutils to 2.20.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binutils/gold/dynobj.cc ('k') | binutils/gold/layout.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/gold/i386.cc
diff --git a/binutils/gold/i386.cc b/binutils/gold/i386.cc
index 445a7ac4bdbae6916aeca99fef587c7f4fe1a2c1..f21cf7432d7c738655a9145df87936749f9dc14e 100644
--- a/binutils/gold/i386.cc
+++ b/binutils/gold/i386.cc
@@ -464,7 +464,7 @@ Target_i386::got_section(Symbol_table* symtab, Layout* layout)
os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
- this->got_);
+ this->got_, false);
os->set_is_relro();
// The old GNU linker creates a .got.plt section. We just
@@ -475,7 +475,7 @@ Target_i386::got_section(Symbol_table* symtab, Layout* layout)
os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
- this->got_plt_);
+ this->got_plt_, false);
os->set_is_relro();
// The first three entries are reserved.
@@ -503,7 +503,7 @@ Target_i386::rel_dyn_section(Layout* layout)
gold_assert(layout != NULL);
this->rel_dyn_ = new Reloc_section(parameters->options().combreloc());
layout->add_output_section_data(".rel.dyn", elfcpp::SHT_REL,
- elfcpp::SHF_ALLOC, this->rel_dyn_);
+ elfcpp::SHF_ALLOC, this->rel_dyn_, true);
}
return this->rel_dyn_;
}
@@ -578,7 +578,7 @@ Output_data_plt_i386::Output_data_plt_i386(Layout* layout,
{
this->rel_ = new Reloc_section(false);
layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL,
- elfcpp::SHF_ALLOC, this->rel_);
+ elfcpp::SHF_ALLOC, this->rel_, true);
}
void
@@ -763,7 +763,7 @@ Target_i386::make_plt_entry(Symbol_table* symtab, Layout* layout, Symbol* gsym)
layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_EXECINSTR),
- this->plt_);
+ this->plt_, false);
}
this->plt_->add_entry(gsym);
@@ -1569,10 +1569,12 @@ Target_i386::do_finalize_sections(Layout* layout)
Output_data_dynamic* const odyn = layout->dynamic_data();
if (odyn != NULL)
{
- if (this->got_plt_ != NULL)
+ if (this->got_plt_ != NULL
+ && this->got_plt_->output_section() != NULL)
odyn->add_section_address(elfcpp::DT_PLTGOT, this->got_plt_);
- if (this->plt_ != NULL)
+ if (this->plt_ != NULL
+ && this->plt_->output_section() != NULL)
{
const Output_data* od = this->plt_->rel_plt();
odyn->add_section_size(elfcpp::DT_PLTRELSZ, od);
@@ -1580,7 +1582,8 @@ Target_i386::do_finalize_sections(Layout* layout)
odyn->add_constant(elfcpp::DT_PLTREL, elfcpp::DT_REL);
}
- if (this->rel_dyn_ != NULL)
+ if (this->rel_dyn_ != NULL
+ && this->rel_dyn_->output_section() != NULL)
{
const Output_data* od = this->rel_dyn_;
odyn->add_section_address(elfcpp::DT_REL, od);
« no previous file with comments | « binutils/gold/dynobj.cc ('k') | binutils/gold/layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698