/* 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.
(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 \
/* 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. */
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 *);
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
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
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. */
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