]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf-bfd.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / bfd / elf-bfd.h
index 9b0a2028d35fda8353a3355f9171ec77601160cb..15206b4e876777b28560ce0fbeaf8364a0b9cd80 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end data structures for ELF files.
-   Copyright (C) 1992-2020 Free Software Foundation, Inc.
+   Copyright (C) 1992-2021 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -791,7 +791,7 @@ struct elf_size_info {
     (bfd *, const Elf_Internal_Rela *, bfd_byte *);
 };
 
-#define elf_symbol_from(ABFD,S) \
+#define elf_symbol_from(S) \
   ((((S)->flags & BSF_SYNTHETIC) == 0                          \
     && (S)->the_bfd != NULL                                    \
     && (S)->the_bfd->xvec->flavour == bfd_target_elf_flavour   \
@@ -1295,8 +1295,7 @@ struct elf_backend_data
 
   /* Merge the backend specific symbol attribute.  */
   void (*elf_backend_merge_symbol_attribute)
-    (struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean,
-     bfd_boolean);
+    (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean);
 
   /* This function, if defined, will return a string containing the
      name of a target-specific dynamic tag.  */
@@ -1571,7 +1570,7 @@ struct elf_backend_data
                                               const char *, unsigned int);
 
   /* Called when after loading the normal relocs for a section.  */
-  bfd_boolean (*slurp_secondary_relocs) (bfd *, asection *, asymbol **);
+  bfd_boolean (*slurp_secondary_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
 
   /* Called after writing the normal relocs for a section.  */
   bfd_boolean (*write_secondary_relocs) (bfd *, asection *);
@@ -1897,14 +1896,15 @@ struct output_elf_obj_tdata
   bfd_boolean flags_init;
 };
 
-/* Indicate if the bfd contains SHF_GNU_MBIND sections or symbols that
-   have the STT_GNU_IFUNC symbol type or STB_GNU_UNIQUE binding.  Used
-   to set the osabi field in the ELF header structure.  */
+/* Indicate if the bfd contains SHF_GNU_MBIND/SHF_GNU_RETAIN sections or
+   symbols that have the STT_GNU_IFUNC symbol type or STB_GNU_UNIQUE
+   binding.  Used to set the osabi field in the ELF header structure.  */
 enum elf_gnu_osabi
 {
   elf_gnu_osabi_mbind = 1 << 0,
   elf_gnu_osabi_ifunc = 1 << 1,
   elf_gnu_osabi_unique = 1 << 2,
+  elf_gnu_osabi_retain = 1 << 3,
 };
 
 typedef struct elf_section_list
@@ -1942,6 +1942,7 @@ struct elf_obj_tdata
   bfd_vma gp;                          /* The gp value */
   unsigned int gp_size;                        /* The gp size */
   unsigned int num_elf_sections;       /* elf_sect_ptr size */
+  unsigned char *being_created;
 
   /* A mapping from external symbols to entries in the linker hash
      table, used when linking.  This is indexed by the symbol index
@@ -2034,7 +2035,7 @@ struct elf_obj_tdata
   ENUM_BITFIELD (dynamic_lib_link_class) dyn_lib_class : 4;
 
   /* Whether the bfd uses OS specific bits that require ELFOSABI_GNU.  */
-  ENUM_BITFIELD (elf_gnu_osabi) has_gnu_osabi : 3;
+  ENUM_BITFIELD (elf_gnu_osabi) has_gnu_osabi : 4;
 
   /* Whether if the bfd contains the GNU_PROPERTY_NO_COPY_ON_PROTECTED
      property.  */
@@ -2918,7 +2919,7 @@ extern bfd_boolean is_debuginfo_file (bfd *);
 extern bfd_boolean _bfd_elf_init_secondary_reloc_section
   (bfd *, Elf_Internal_Shdr *, const char *, unsigned int);
 extern bfd_boolean _bfd_elf_slurp_secondary_reloc_section
-  (bfd *, asection *, asymbol **);
+  (bfd *, asection *, asymbol **, bfd_boolean);
 extern bfd_boolean _bfd_elf_copy_special_section_fields
   (const bfd *, bfd *, const Elf_Internal_Shdr *, Elf_Internal_Shdr *);
 extern bfd_boolean _bfd_elf_write_secondary_reloc_section