aboutsummaryrefslogtreecommitdiff
path: root/gold/arm.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-09-12 22:43:54 +0000
committerAlan Modra <amodra@gmail.com>2012-09-12 22:43:54 +0000
commitbfdfa4cd8da8b878613e3ee98c8268f8aa72983c (patch)
tree2ee2b0b7b57dafee8585b56c562cef597f3b8266 /gold/arm.cc
parent7c0e90d28c56dd5e0003c921d15aded77c9a639d (diff)
downloadgdb-bfdfa4cd8da8b878613e3ee98c8268f8aa72983c.zip
gdb-bfdfa4cd8da8b878613e3ee98c8268f8aa72983c.tar.gz
gdb-bfdfa4cd8da8b878613e3ee98c8268f8aa72983c.tar.bz2
* target-reloc.h (scan_relocs): Call scan.local for relocs
against symbols in discarded sections. Pass is_discarded param. * arm.cc, * i386.cc, * sparc.cc, * x86_64.cc (Target_*::Scan::local): Add is_discarded param. * powerpc (Target_powerpc::Scan::local): Likewise. Use is_discarded to flag opd entry as discarded. Don't emit dyn relocs on such entries. (Target_powerpc::Scan::global): Similarly detect and handle such opd entries. (Powerpc_relobj): Replace opd_ent_shndx_ and opd_ent_off_ with opd_ent_. Update all uses. (Powerpc_relobj::get_opd_discard, set_opd_discard): New functions. (Target_powerpc::relocate_section): Zero out discarded opd entry relocs.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r--gold/arm.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/arm.cc b/gold/arm.cc
index 351c6fe..d874ce0 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -2551,7 +2551,8 @@ class Target_arm : public Sized_target<32, big_endian>
unsigned int data_shndx,
Output_section* output_section,
const elfcpp::Rel<32, big_endian>& reloc, unsigned int r_type,
- const elfcpp::Sym<32, big_endian>& lsym);
+ const elfcpp::Sym<32, big_endian>& lsym,
+ bool is_discarded);
inline void
global(Symbol_table* symtab, Layout* layout, Target_arm* target,
@@ -7857,8 +7858,12 @@ Target_arm<big_endian>::Scan::local(Symbol_table* symtab,
Output_section* output_section,
const elfcpp::Rel<32, big_endian>& reloc,
unsigned int r_type,
- const elfcpp::Sym<32, big_endian>& lsym)
+ const elfcpp::Sym<32, big_endian>& lsym,
+ bool is_discarded)
{
+ if (is_discarded)
+ return;
+
r_type = get_real_reloc_type(r_type);
switch (r_type)
{