Use __asm__ rather than asm in gold testsuite
[deliverable/binutils-gdb.git] / gold / testsuite / testfile.cc
index 88e5b816cb372bc46c7e667252f304232e0728a8..a41ec1991ef65aa2b9716a5e9fa7c87af13e9e7a 100644 (file)
@@ -1,6 +1,6 @@
 // testfile.cc -- Dummy ELF objects for testing purposes.
 
-// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -44,13 +44,14 @@ class Target_test : public Sized_target<size, big_endian>
   { }
 
   void
-  gc_process_relocs(Symbol_table*, Layout*, Sized_relobj<size, big_endian>*,
+  gc_process_relocs(Symbol_table*, Layout*,
+                   Sized_relobj_file<size, big_endian>*,
                    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<size, big_endian>*,
+  scan_relocs(Symbol_table*, Layout*, Sized_relobj_file<size, big_endian>*,
              unsigned int, unsigned int, const unsigned char*, size_t,
              Output_section*, bool, size_t, const unsigned char*)
   { ERROR("call to Target_test::scan_relocs"); }
@@ -64,21 +65,29 @@ class Target_test : public Sized_target<size, big_endian>
 
   void
   scan_relocatable_relocs(Symbol_table*, Layout*,
-                         Sized_relobj<size, big_endian>*, unsigned int,
+                         Sized_relobj_file<size, big_endian>*, 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
-  relocate_for_relocatable(const Relocate_info<size, big_endian>*,
-                          unsigned int, const unsigned char*, size_t,
-                          Output_section*, off_t, const Relocatable_relocs*,
-                          unsigned char*,
-                          typename elfcpp::Elf_types<size>::Elf_Addr,
-                          section_size_type, unsigned char*,
-                          section_size_type)
-  { ERROR("call to Target_test::relocate_for_relocatable"); }
+  emit_relocs_scan(Symbol_table*, Layout*,
+                  Sized_relobj_file<size, big_endian>*, 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<size, big_endian>*,
+                 unsigned int, const unsigned char*, size_t,
+                 Output_section*, typename elfcpp::Elf_types<size>::Elf_Off,
+                 unsigned char*,
+                 typename elfcpp::Elf_types<size>::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;
 };
@@ -93,15 +102,23 @@ const Target::Target_info Target_test<size, big_endian>::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
+  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
+  0,                                   // large_common_section_flags
+  NULL,                                        // attributes_section
+  NULL,                                        // attributes_vendor
+  "_start",                            // entry_symbol_name
+  32,                                  // hash_entry_size
+  elfcpp::SHT_PROGBITS,                        // unwind_section_type
 };
 
 // The test targets.
@@ -147,18 +164,18 @@ class Target_selector_test : public Target_selector
 {
  public:
   Target_selector_test()
-    : Target_selector(0xffff, size, big_endian, NULL)
+    : Target_selector(0xffff, size, big_endian, NULL, NULL)
   { }
 
-  Target*
+  virtual Target*
   do_instantiate_target()
   {
     gold_unreachable();
     return NULL;
   }
 
-  Target*
-  do_recognize(int, int, int)
+  virtual Target*
+  do_recognize(Input_file*, off_t, int, int, int)
   {
     if (size == 32)
       {
@@ -194,11 +211,11 @@ class Target_selector_test : public Target_selector
     return NULL;
   }
 
-  Target*
+  virtual Target*
   do_recognize_by_name(const char*)
   { return NULL; }
 
-  void
+  virtual void
   do_supported_names(std::vector<const char*>*)
   { }
 };
This page took 0.025846 seconds and 4 git commands to generate.