aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2009-10-01 00:58:38 +0000
committerDoug Kwan <dougkwan@google.com>2009-10-01 00:58:38 +0000
commit966d4097440bd7c3e35524bebf39d8bbe2e26fd6 (patch)
tree80a25b71ca7f2b3529c90ee004d50fb78239c298 /gold/x86_64.cc
parent7cacf37ef6dca17f1e65cbfa073faac07504397f (diff)
downloadgdb-966d4097440bd7c3e35524bebf39d8bbe2e26fd6.zip
gdb-966d4097440bd7c3e35524bebf39d8bbe2e26fd6.tar.gz
gdb-966d4097440bd7c3e35524bebf39d8bbe2e26fd6.tar.bz2
2009-09-30 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function symbol and call Symbol::may_need_copy_reloc to determine if a copy reloc is needed. * copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z nocopyreloc is given in command line. (Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not given in command line. * i386.cc (Target_i386::may_need_copy_reloc): Remove. (Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead of the removed Target_i386::may_need_copy_reloc. * options.h (copyreloc): New option with default value false. * powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove. (Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc instead of the removed Target_powerpc::may_need_copy_reloc. * sparc.cc (Target_powerpc::may_need_copy_reloc): Remove. (Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc instead of the removed Target_sparc::may_need_copy_reloc. * symtab.h (Symbol::may_need_copy_reloc): New method definition. * x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove. (Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc instead of the removed Target_x86_64::may_need_copy_reloc.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 9287d58..419746d 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -375,17 +375,6 @@ class Target_x86_64 : public Target_freebsd<64, false>
Reloc_section*
rela_dyn_section(Layout*);
- // Return true if the symbol may need a COPY relocation.
- // References from an executable object to non-function symbols
- // defined in a dynamic object may need a COPY relocation.
- bool
- may_need_copy_reloc(Symbol* gsym)
- {
- return (!parameters->options().shared()
- && gsym->is_from_dynobj()
- && gsym->type() != elfcpp::STT_FUNC);
- }
-
// Add a potential copy relocation.
void
copy_reloc(Symbol_table* symtab, Layout* layout,
@@ -1323,7 +1312,7 @@ Target_x86_64::Scan::global(const General_options&,
// Make a dynamic relocation if necessary.
if (gsym->needs_dynamic_reloc(Symbol::ABSOLUTE_REF))
{
- if (target->may_need_copy_reloc(gsym))
+ if (gsym->may_need_copy_reloc())
{
target->copy_reloc(symtab, layout, object,
data_shndx, output_section, gsym, reloc);
@@ -1363,7 +1352,7 @@ Target_x86_64::Scan::global(const General_options&,
flags |= Symbol::FUNCTION_CALL;
if (gsym->needs_dynamic_reloc(flags))
{
- if (target->may_need_copy_reloc(gsym))
+ if (gsym->may_need_copy_reloc())
{
target->copy_reloc(symtab, layout, object,
data_shndx, output_section, gsym, reloc);