diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-04-16 22:54:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-04-16 22:54:29 +0000 |
commit | 1ab93861d1aaa0314e79644e7870f59ab5ce6703 (patch) | |
tree | dde23cddf30fa268800149b5551989a879c04001 /gold/reloc-types.h | |
parent | f2ecd250b98696a8eaf93e39ebc035879935e989 (diff) | |
download | binutils-redhat-1ab93861d1aaa0314e79644e7870f59ab5ce6703.tar.gz |
* copy-relocs.cc: New file.
* copy-relocs.h: New file.
* reloc.cc: Remove Copy_relocs code.
* reloc.h: Likewise.
* reloc-types.h (struct Reloc_types) [both versions]: Add
get_reloc_addend_noerror.
* output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
variants of add_global which take an addend which must be zero.
* i386.cc: Include "copy-relocs.h".
(class Target_i386): Change type of copy_relocs_ to variable,
update initializer.
(Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
Change all callers.
(Target_i386::do_finalize_sections): Change handling of
copy_relocs_.
* sparc.cc: Include "copy-relocs.h".
(class Target_sparc): Change type of copy_relocs_ to variable,
update initializer.
(Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
Change all callers.
(Target_sparc::do_finalize_sections): Change handling of
copy_relocs_.
* x86_64.cc: Include "copy-relocs.h".
(class Target_x86_64): Change type of copy_relocs_ to variable,
update initializer.
(Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
class. Change all callers.
(Target_x86_64::do_finalize_sections): Change handling of
copy_relocs_.
* Makefile.am (CCFILES): Add copy-relocs.cc.
(HFILES): Add copy-relocs.h.
Diffstat (limited to 'gold/reloc-types.h')
-rw-r--r-- | gold/reloc-types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/reloc-types.h b/gold/reloc-types.h index c5218435e6..f13e64ae27 100644 --- a/gold/reloc-types.h +++ b/gold/reloc-types.h @@ -48,6 +48,10 @@ struct Reloc_types<elfcpp::SHT_REL, size, big_endian> get_reloc_addend(const Reloc*) { gold_unreachable(); } + static inline typename elfcpp::Elf_types<size>::Elf_Swxword + get_reloc_addend_noerror(const Reloc*) + { return 0; } + static inline void set_reloc_addend(Reloc_write*, typename elfcpp::Elf_types<size>::Elf_Swxword) @@ -69,6 +73,10 @@ struct Reloc_types<elfcpp::SHT_RELA, size, big_endian> get_reloc_addend(const Reloc* p) { return p->get_r_addend(); } + static inline typename elfcpp::Elf_types<size>::Elf_Swxword + get_reloc_addend_noerror(const Reloc* p) + { return p->get_r_addend(); } + static inline void set_reloc_addend(Reloc_write* p, typename elfcpp::Elf_types<size>::Elf_Swxword val) |