-// This is a strategy class we use when scanning for --emit-relocs.
-
-template<int sh_type>
-class Emit_relocs_strategy
-{
- public:
- // A local non-section symbol.
- inline Relocatable_relocs::Reloc_strategy
- local_non_section_strategy(unsigned int, Relobj*, unsigned int)
- { return Relocatable_relocs::RELOC_COPY; }
-
- // A local section symbol.
- inline Relocatable_relocs::Reloc_strategy
- local_section_strategy(unsigned int, Relobj*)
- {
- if (sh_type == elfcpp::SHT_RELA)
- return Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA;
- else
- {
- // The addend is stored in the section contents. Since this
- // is not a relocatable link, we are going to apply the
- // relocation contents to the section as usual. This means
- // that we have no way to record the original addend. If the
- // original addend is not zero, there is basically no way for
- // the user to handle this correctly. Caveat emptor.
- return Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_0;
- }
- }
-
- // A global symbol.
- inline Relocatable_relocs::Reloc_strategy
- global_strategy(unsigned int, Relobj*, unsigned int)
- { return Relocatable_relocs::RELOC_COPY; }
-};
-