aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-08-28 16:27:33 +0930
committerAlan Modra <amodra@gmail.com>2017-08-28 16:27:33 +0930
commit565ed01a4e0e3584f24580177822a5271b1c0c8b (patch)
treee9b966a4414efec1764b7157318faa9d0cd8435e /gold/symtab.h
parent41e52377486950e32a1bc121e4c42abc8561aee5 (diff)
downloadbinutils-565ed01a4e0e3584f24580177822a5271b1c0c8b.zip
binutils-565ed01a4e0e3584f24580177822a5271b1c0c8b.tar.gz
binutils-565ed01a4e0e3584f24580177822a5271b1c0c8b.tar.bz2
[GOLD] Symbol flag for PowerPC64 localentry:0 tracking
This patch provides a flag for PowerPC64 ELFv2 use in class Symbol, and modifies Sized_target::resolve to return whether the symbol has been resolved. If not, normal processing continues. I use this for PowerPC64 ELFv2 to keep track of whether a symbol has any definition with non-zero localentry, in order to disable --plt-localentry for that symbol. PR 21847 * powerpc.cc (Target_powerpc::is_elfv2_localentry0): Test non_zero_localentry. (Target_powerpc::resolve): New function. (powerpc_info): Set has_resolve for 64-bit. * target.h (Sized_target::resolve): Return bool. * resolve.cc (Symbol_table::resolve): Continue with normal processing when target resolve returns false. * symtab.h (Symbol::non_zero_localentry, set_non_zero_localentry): New accessors. (Symbol::non_zero_localentry_): New flag bit. * symtab.cc (Symbol::init_fields): Init non_zero_localentry_.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index 77552ae..c371731 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -883,6 +883,16 @@ class Symbol
set_is_protected()
{ this->is_protected_ = true; }
+ // Return state of PowerPC64 ELFv2 specific flag.
+ bool
+ non_zero_localentry() const
+ { return this->non_zero_localentry_; }
+
+ // Set PowerPC64 ELFv2 specific flag.
+ void
+ set_non_zero_localentry()
+ { this->non_zero_localentry_ = true; }
+
protected:
// Instances of this class should always be created at a specific
// size.
@@ -1084,6 +1094,8 @@ class Symbol
// The visibility_ field will be STV_DEFAULT in this case because we
// must treat it as such from outside the shared object.
bool is_protected_ : 1;
+ // Used by PowerPC64 ELFv2 to track st_other localentry (bit 36).
+ bool non_zero_localentry_ : 1;
};
// The parts of a symbol which are size specific. Using a template