X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Ftestsuite%2Ftestfile.cc;h=4049e4ae831944812c9996c904f86f9b253b6d20;hb=4d625b70fc3fb7facc7159feb8d49b78ac6641f9;hp=8e6a48d0b4b8f5b38d5db6881683aa94c12d3b74;hpb=35cdfc9a874553807400007ffa36cf2884ba40f6;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/testsuite/testfile.cc b/gold/testsuite/testfile.cc index 8e6a48d0b4..4049e4ae83 100644 --- a/gold/testsuite/testfile.cc +++ b/gold/testsuite/testfile.cc @@ -1,6 +1,6 @@ // testfile.cc -- Dummy ELF objects for testing purposes. -// Copyright 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2006-2016 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -44,18 +44,51 @@ class Target_test : public Sized_target { } void - scan_relocs(const General_options&, Symbol_table*, Layout*, - Sized_relobj*, unsigned int, - unsigned int, const unsigned char*, size_t, size_t, - const unsigned char*, Symbol**) + gc_process_relocs(Symbol_table*, Layout*, + Sized_relobj_file*, + unsigned int, unsigned int, const unsigned char*, size_t, + Output_section*, bool, size_t, const unsigned char*) + { ERROR("call to Target_test::gc_process_relocs"); } + + void + scan_relocs(Symbol_table*, Layout*, Sized_relobj_file*, + unsigned int, unsigned int, const unsigned char*, size_t, + Output_section*, bool, size_t, const unsigned char*) { ERROR("call to Target_test::scan_relocs"); } void relocate_section(const Relocate_info*, unsigned int, - const unsigned char*, size_t, unsigned char*, - typename elfcpp::Elf_types::Elf_Addr, off_t) + const unsigned char*, size_t, Output_section*, bool, + unsigned char*, typename elfcpp::Elf_types::Elf_Addr, + section_size_type, const Reloc_symbol_changes*) { ERROR("call to Target_test::relocate_section"); } + void + scan_relocatable_relocs(Symbol_table*, Layout*, + Sized_relobj_file*, unsigned int, + unsigned int, const unsigned char*, + size_t, Output_section*, bool, size_t, + const unsigned char*, Relocatable_relocs*) + { ERROR("call to Target_test::scan_relocatable_relocs"); } + + void + emit_relocs_scan(Symbol_table*, Layout*, + Sized_relobj_file*, unsigned int, + unsigned int, const unsigned char*, + size_t, Output_section*, bool, size_t, + const unsigned char*, Relocatable_relocs*) + { ERROR("call to Target_test::emit_relocs_scan"); } + + void + relocate_relocs(const Relocate_info*, + unsigned int, const unsigned char*, size_t, + Output_section*, typename elfcpp::Elf_types::Elf_Off, + unsigned char*, + typename elfcpp::Elf_types::Elf_Addr, + section_size_type, unsigned char*, + section_size_type) + { ERROR("call to Target_test::relocate_relocs"); } + static const Target::Target_info test_target_info; }; @@ -69,10 +102,22 @@ const Target::Target_info Target_test::test_target_info = false, // has_resolve false, // has_code_fill false, // is_default_stack_executable + false, // can_icf_inline_merge_sections + '\0', // wrap_char "/dummy", // dynamic_linker 0x08000000, // default_text_segment_address 0x1000, // abi_pagesize - 0x1000 // common_pagesize + 0x1000, // common_pagesize + false, // isolate_execinstr + 0, // rosegment_gap + elfcpp::SHN_UNDEF, // small_common_shndx + elfcpp::SHN_UNDEF, // large_common_shndx + 0, // small_common_section_flags + 0, // large_common_section_flags + NULL, // attributes_section + NULL, // attributes_vendor + "_start", // entry_symbol_name + 32, // hash_entry_size }; // The test targets. @@ -118,11 +163,18 @@ class Target_selector_test : public Target_selector { public: Target_selector_test() - : Target_selector(0xffff, size, big_endian) + : Target_selector(0xffff, size, big_endian, NULL, NULL) { } - Target* - recognize(int, int, int) + virtual Target* + do_instantiate_target() + { + gold_unreachable(); + return NULL; + } + + virtual Target* + do_recognize(Input_file*, off_t, int, int, int) { if (size == 32) { @@ -157,6 +209,14 @@ class Target_selector_test : public Target_selector return NULL; } + + virtual Target* + do_recognize_by_name(const char*) + { return NULL; } + + virtual void + do_supported_names(std::vector*) + { } }; // Register the test target selectors. These don't need to be