diff options
Diffstat (limited to 'binutils-2.24/gold')
-rw-r--r-- | binutils-2.24/gold/ChangeLog | 8 | ||||
-rw-r--r-- | binutils-2.24/gold/layout.cc | 12 |
2 files changed, 17 insertions, 3 deletions
diff --git a/binutils-2.24/gold/ChangeLog b/binutils-2.24/gold/ChangeLog index dcf7ed4..089a34a 100644 --- a/binutils-2.24/gold/ChangeLog +++ b/binutils-2.24/gold/ChangeLog @@ -1,3 +1,11 @@ +2014-12-01 Cary Coutant <ccoutant@google.com> + + PR gold/17578 + * layout.cc (Layout::layout_gnu_stack): Don't warn when -z execstack + is given. + (Layout::create_executable_stack_info): Warn when -z noexecstack is + given but some inputs require executable stack. + 2013-11-22 Cary Coutant <ccoutant@google.com> * testsuite/Makefile.am (exception_x86_64_bnd_test): Use in-tree diff --git a/binutils-2.24/gold/layout.cc b/binutils-2.24/gold/layout.cc index 38fd272..b0a9026 100644 --- a/binutils-2.24/gold/layout.cc +++ b/binutils-2.24/gold/layout.cc @@ -2086,8 +2086,7 @@ Layout::layout_gnu_stack(bool seen_gnu_stack, uint64_t gnu_stack_flags, if ((gnu_stack_flags & elfcpp::SHF_EXECINSTR) != 0) { this->input_requires_executable_stack_ = true; - if (parameters->options().warn_execstack() - || parameters->options().is_stack_executable()) + if (parameters->options().warn_execstack()) gold_warning(_("%s: requires executable stack"), obj->name().c_str()); } @@ -2958,7 +2957,14 @@ Layout::create_executable_stack_info() { bool is_stack_executable; if (parameters->options().is_execstack_set()) - is_stack_executable = parameters->options().is_stack_executable(); + { + is_stack_executable = parameters->options().is_stack_executable(); + if (!is_stack_executable + && this->input_requires_executable_stack_ + && parameters->options().warn_execstack()) + gold_warning(_("one or more inputs require executable stack, " + "but -z noexecstack was given")); + } else if (!this->input_with_gnu_stack_note_) return; else |