Don't write to inferior_ptid in infrun.c
[deliverable/binutils-gdb.git] / bfd / elf-bfd.h
index 5f3a5cc04b17aa825098f3567426f36b67d290dc..242750fa581b3163f54efec9c1b81b3dad368171 100644 (file)
@@ -156,9 +156,13 @@ struct elf_link_hash_entry
   /* Same, but tracks a procedure linkage table entry.  */
   union gotplt_union plt;
 
-  /* Symbol size.  */
+  /* Symbol size.  NB: All fields starting from here are cleared by
+    _bfd_elf_link_hash_newfunc.  */
   bfd_size_type size;
 
+  /* Track dynamic relocs copied for this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+
   /* Symbol type (STT_NOTYPE, STT_OBJECT, etc.).  */
   unsigned int type : 8;
 
@@ -536,6 +540,15 @@ struct bfd_link_needed_list
   const char *name;
 };
 
+enum elf_target_os
+{
+  is_normal,
+  is_symbian,  /* Symbian OS.  */
+  is_solaris,  /* Solaris.  */
+  is_vxworks,  /* VxWorks.  */
+  is_nacl      /* Native Client.  */
+};
+
 /* ELF linker hash table.  */
 
 struct elf_link_hash_table
@@ -557,6 +570,9 @@ struct elf_link_hash_table
      section symbols.  */
   bfd_boolean is_relocatable_executable;
 
+  /* TRUE if there are IFUNC resolvers.  */
+  bfd_boolean ifunc_resolvers;
+
   /* The BFD used to hold special sections created by the linker.
      This will be the first BFD found which requires these sections to
      be created.  */
@@ -637,6 +653,20 @@ struct elf_link_hash_table
   asection *tls_sec;
   bfd_size_type tls_size;  /* Bytes.  */
 
+  /* The offset into splt of the PLT entry for the TLS descriptor
+     resolver.  Special values are 0, if not necessary (or not found
+     to be necessary yet), and -1 if needed but not determined
+     yet.  */
+  bfd_vma tlsdesc_plt;
+
+  /* The GOT offset for the lazy trampoline.  Communicated to the
+     loader via DT_TLSDESC_GOT.  The magic value (bfd_vma) -1
+     indicates an offset is not allocated.  */
+  bfd_vma tlsdesc_got;
+
+  /* Target OS for linker output.  */
+  enum elf_target_os target_os;
+
   /* A linked list of dynamic BFD's loaded in the link.  */
   struct elf_link_loaded_list *dyn_loaded;
 
@@ -857,6 +887,9 @@ struct elf_backend_data
      extensions to elf_obj_tdata and elf_link_hash_table structures.  */
   enum elf_target_id target_id;
 
+  /* Target OS.  */
+  enum elf_target_os target_os;
+
   /* The ELF machine code (EM_xxxx) for this backend.  */
   int elf_machine_code;
 
@@ -1083,6 +1116,12 @@ struct elf_backend_data
   bfd_boolean (*elf_backend_size_dynamic_sections)
     (bfd *output_bfd, struct bfd_link_info *info);
 
+  /* The STRIP_ZERO_SIZED_DYNAMIC_SECTIONS function is called by the
+     ELF backend linker to strip zero-sized dynamic sections after
+     the section sizes have been set.  */
+  bfd_boolean (*elf_backend_strip_zero_sized_dynamic_sections)
+    (struct bfd_link_info *info);
+
   /* Set TEXT_INDEX_SECTION and DATA_INDEX_SECTION, the output sections
      we keep to use as a base for relocs and symbols.  */
   void (*elf_backend_init_index_section)
@@ -2077,8 +2116,6 @@ extern bfd_boolean _bfd_elf_copy_private_bfd_data
 extern bfd_boolean _bfd_elf_print_private_bfd_data
   (bfd *, void *);
 const char * _bfd_elf_get_symbol_version_string
-  (bfd *, asymbol *, bfd_boolean *);
-const char * _bfd_elf_get_symbol_version_name
   (bfd *, asymbol *, bfd_boolean, bfd_boolean *);
 extern void bfd_elf_print_symbol
   (bfd *, void *, asymbol *, bfd_print_symbol_type);
@@ -2522,6 +2559,8 @@ extern bfd_boolean bfd_elf_link_add_symbols
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_add_dynamic_entry
   (struct bfd_link_info *, bfd_vma, bfd_vma);
+extern bfd_boolean _bfd_elf_strip_zero_sized_dynamic_sections
+  (struct bfd_link_info *);
 extern int bfd_elf_add_dt_needed_tag
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_link_check_relocs
@@ -2732,6 +2771,8 @@ extern char *elfcore_write_aarch_sve
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_aarch_pauth
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arc_v2
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
@@ -2837,8 +2878,8 @@ extern bfd_boolean _bfd_elf_create_ifunc_sections
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
   (struct bfd_link_info *, struct elf_link_hash_entry *,
-   struct elf_dyn_relocs **, bfd_boolean *, unsigned int,
-   unsigned int, unsigned int, bfd_boolean);
+   struct elf_dyn_relocs **, unsigned int, unsigned int,
+   unsigned int, bfd_boolean);
 
 extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *);
 extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *);
@@ -2862,6 +2903,10 @@ extern bfd_boolean _bfd_elf_write_secondary_reloc_section
 extern unsigned int _bfd_elf_symbol_section_index
   (bfd *, elf_symbol_type *);
 
+extern asection *_bfd_elf_readonly_dynrelocs
+  (struct elf_link_hash_entry *);
+extern bfd_boolean _bfd_elf_maybe_set_textrel
+  (struct elf_link_hash_entry *, void *);
 
 /* Large common section.  */
 extern asection _bfd_elf_large_com_section;
@@ -2932,8 +2977,9 @@ extern asection _bfd_elf_large_com_section;
       else if (!bfd_link_relocatable (info))                           \
        {                                                               \
          bfd_boolean err;                                              \
-         err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR  \
-                || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT);       \
+         err = (info->unresolved_syms_in_objects == RM_DIAGNOSE &&     \
+                !info->warn_unresolved_syms)                           \
+                || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT;        \
          (*info->callbacks->undefined_symbol) (info,                   \
                                                h->root.root.string,    \
                                                input_bfd,              \
This page took 0.027856 seconds and 4 git commands to generate.