#include "elf/external.h"
#include "bfdlink.h"
+/* The number of entries in a section is its size divided by the size
+ of a single entry. This is normally only applicaable to reloc and
+ symbol table sections. */
+#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
+
/* If size isn't specified as 64 or 32, NAME macro should fail. */
#ifndef NAME
#if ARCH_SIZE==64
void (*elf_backend_hide_symbol)
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+ /* Emit relocations. Overrides default routine for emitting relocs,
+ except during a relocatable link, or if all relocs are being emitted. */
+ void (*elf_backend_emit_relocs)
+ PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
+
+ /* Count relocations. Not called for relocatable links
+ or if all relocs are being preserved in the output. */
+ unsigned int (*elf_backend_count_relocs)
+ PARAMS ((asection *, Elf_Internal_Rela *));
+
+ /* This function, if defined, is called when an NT_PRSTATUS note is found
+ in a core file. */
+ boolean (*elf_backend_grok_prstatus) PARAMS ((bfd *, Elf_Internal_Note *));
+
+ /* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO
+ note is found in a core file. */
+ boolean (*elf_backend_grok_psinfo) PARAMS ((bfd *, Elf_Internal_Note *));
+
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap;
unsigned plt_not_loaded : 1;
unsigned plt_alignment : 4;
unsigned can_gc_sections : 1;
+ unsigned want_got_sym : 1;
unsigned want_dynbss : 1;
};
#define bfd_elf32_print_symbol bfd_elf_print_symbol
#define bfd_elf64_print_symbol bfd_elf_print_symbol
+extern void bfd_elf_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void bfd_elf_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
+
extern unsigned long bfd_elf_hash PARAMS ((const char *));
extern bfd_reloc_status_type bfd_elf_generic_reloc PARAMS ((bfd *,
const char *)));
extern boolean _bfd_elf_slurp_version_tables PARAMS ((bfd *));
+extern boolean _bfd_elf_merge_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
extern boolean _bfd_elf_copy_private_symbol_data
PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
extern boolean _bfd_elf_copy_private_section_data
unsigned long _bfd_elf_link_renumber_dynsyms PARAMS ((bfd *,
struct bfd_link_info *));
+boolean _bfd_elfcore_make_pseudosection PARAMS ((bfd *, char *, int, int));
+char *_bfd_elfcore_strndup PARAMS ((bfd *, char *, int));
+
elf_linker_section_t *_bfd_elf_create_linker_section
PARAMS ((bfd *abfd,
struct bfd_link_info *info,
elf_linker_section_t *lsect,
int alignment));
-boolean _bfd_elfcore_section_from_phdr
- PARAMS ((bfd *, Elf_Internal_Phdr *, int));
-
extern const bfd_target *bfd_elf32_object_p PARAMS ((bfd *));
extern const bfd_target *bfd_elf32_core_file_p PARAMS ((bfd *));
extern char *bfd_elf32_core_file_failing_command PARAMS ((bfd *));