diff options
author | Cary Coutant <ccoutant@gmail.com> | 2016-01-12 11:39:50 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-01-12 11:39:50 -0800 |
commit | 8a8880cb673893c479b473f598905c0490897817 (patch) | |
tree | 1cfdc0e3a0d152b999c44864248ffde869c78e20 /gold/arm.cc | |
parent | d1193addae7e5a24dc867f9946681ef0781a766f (diff) | |
download | gdb-8a8880cb673893c479b473f598905c0490897817.zip gdb-8a8880cb673893c479b473f598905c0490897817.tar.gz gdb-8a8880cb673893c479b473f598905c0490897817.tar.bz2 |
Fix breakage for SHT_REL targets where get_r_addend() gives internal error.
gold/
* arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
* i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
* mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
specializations) New method.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r-- | gold/arm.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/arm.cc b/gold/arm.cc index 4cd0b91..ed13c87 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -2749,6 +2749,14 @@ class Target_arm : public Sized_target<32, big_endian> public gold::Default_classify_reloc<elfcpp::SHT_REL, 32, big_endian> { public: + typedef typename Reloc_types<elfcpp::SHT_REL, 32, big_endian>::Reloc + Reltype; + + // Return the explicit addend of the relocation (return 0 for SHT_REL). + static typename elfcpp::Elf_types<32>::Elf_Swxword + get_r_addend(const Reltype*) + { return 0; } + // Return the size of the addend of the relocation (only used for SHT_REL). static unsigned int get_size_for_reloc(unsigned int, Relobj*); |