This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix problem where __start_ and __stop_ section symbols do not honor version script.
- From: Cary Coutant <ccoutant at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 21 Jul 2015 23:10:31 -0000
- Subject: [binutils-gdb] Fix problem where __start_ and __stop_ section symbols do not honor version script.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5417c94d1a944d1a27f99240e5d62a6d7cd324f1
commit 5417c94d1a944d1a27f99240e5d62a6d7cd324f1
Author: Cary Coutant <ccoutant@gmail.com>
Date: Tue Jul 21 16:10:05 2015 -0700
Fix problem where __start_ and __stop_ section symbols do not honor version script.
When creating the special __start_ and __stop_ section symbols, gold
does not check the version script to see if they should be local
instead of global.
2015-07-21 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/18548
* symtab.cc (Symbol_table::do_define_in_output_data): Check for
forced local symbol even when oldsym != NULL.
(Symbol_table::do_define_in_output_segment): Likewise.
(Symbol_table::do_define_as_constant): Likewise.
Diff:
---
gold/ChangeLog | 8 ++++++++
gold/symtab.cc | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 7fdc7bf..a74d96c 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,13 @@
2015-07-21 Cary Coutant <ccoutant@gmail.com>
+ PR gold/18548
+ * symtab.cc (Symbol_table::do_define_in_output_data): Check for
+ forced local symbol even when oldsym != NULL.
+ (Symbol_table::do_define_in_output_segment): Likewise.
+ (Symbol_table::do_define_as_constant): Likewise.
+
+2015-07-21 Cary Coutant <ccoutant@gmail.com>
+
PR gold/18698
* archive.cc (Library_base::should_include_member): Don't use entry
point for relocatable links, or if target is not yet valid.
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 925296a..31ecc5c 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1953,6 +1953,9 @@ Symbol_table::do_define_in_output_data(
return sym;
else
{
+ if (binding == elfcpp::STB_LOCAL
+ || this->version_script_.symbol_is_local(name))
+ this->force_local(oldsym);
delete sym;
return oldsym;
}
@@ -2067,6 +2070,9 @@ Symbol_table::do_define_in_output_segment(
return sym;
else
{
+ if (binding == elfcpp::STB_LOCAL
+ || this->version_script_.symbol_is_local(name))
+ this->force_local(oldsym);
delete sym;
return oldsym;
}
@@ -2186,6 +2192,9 @@ Symbol_table::do_define_as_constant(
return sym;
else
{
+ if (binding == elfcpp::STB_LOCAL
+ || this->version_script_.symbol_is_local(name))
+ this->force_local(oldsym);
delete sym;
return oldsym;
}