aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-11-01 16:09:56 +1030
committerAlan Modra <amodra@gmail.com>2013-11-04 16:00:13 +1030
commit88b8e63904fda25c029deaf25d7b4e489b351470 (patch)
tree5a2a5dbe1fed7c88ce042b6e9f1df2208f9f7fc8 /gold/symtab.h
parent25153ba0870289c6b5f26e9552c5501a33571570 (diff)
downloadgdb-88b8e63904fda25c029deaf25d7b4e489b351470.zip
gdb-88b8e63904fda25c029deaf25d7b4e489b351470.tar.gz
gdb-88b8e63904fda25c029deaf25d7b4e489b351470.tar.bz2
Remove powerpc.cc copy of use_plt_offset
This adds an extra flag for needs_dynamic_reloc() in order to remove the copy of this function and use_plt_offset() in powerpc.cc, and tweaks the powerpc get_reference_flags() to return the flag as appropriate. ELFv2 does not want ELFv1 behaviour here. * symtab.h (Symbol::Reference_flags): Add FUNC_DESC_ABI. (Symbol::needs_dynamic_reloc): Test new flag. * powerpc.cc (needs_dynamic_reloc, use_plt_offset): Delete. (Target_powerpc::Scan::get_reference_flags): Add target param. Return FUNC_DESC_ABI for 64-bit ELFv1. (Target_powerpc::Branch_info::make_stub): Adjust get_reference_flags call. (Target_powerpc::Scan::global): Use Symbol::needs_dynamic_reloc. (Target_powerpc::Relocate::relocate): Use Symbol::use_plt_offset.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index 9299ea8..1232c97 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -638,7 +638,10 @@ class Symbol
// A TLS-related reference.
TLS_REF = 4,
// A reference that can always be treated as a function call.
- FUNCTION_CALL = 8
+ FUNCTION_CALL = 8,
+ // When set, says that dynamic relocations are needed even if a
+ // symbol has a plt entry.
+ FUNC_DESC_ABI = 16,
};
// Given a direct absolute or pc-relative static relocation against
@@ -675,7 +678,8 @@ class Symbol
// A reference to any PLT entry in a non-position-independent executable
// does not need a dynamic relocation.
- if (!parameters->options().output_is_position_independent()
+ if (!(flags & FUNC_DESC_ABI)
+ && !parameters->options().output_is_position_independent()
&& this->has_plt_offset())
return false;