9 kx /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
9 kx generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
9 kx "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
9 kx "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
9 kx "linker.c", "simple.c" and "compress.c".
9 kx Run "make headers" in your build bfd/ to regenerate. */
9 kx
9 kx /* Main header file for the bfd library -- portable access to object files.
9 kx
9 kx Copyright (C) 1990-2023 Free Software Foundation, Inc.
9 kx
9 kx Contributed by Cygnus Support.
9 kx
9 kx This file is part of BFD, the Binary File Descriptor library.
9 kx
9 kx This program is free software; you can redistribute it and/or modify
9 kx it under the terms of the GNU General Public License as published by
9 kx the Free Software Foundation; either version 3 of the License, or
9 kx (at your option) any later version.
9 kx
9 kx This program is distributed in the hope that it will be useful,
9 kx but WITHOUT ANY WARRANTY; without even the implied warranty of
9 kx MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 kx GNU General Public License for more details.
9 kx
9 kx You should have received a copy of the GNU General Public License
9 kx along with this program; if not, write to the Free Software
9 kx Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
9 kx
9 kx #ifndef __BFD_H_SEEN__
9 kx #define __BFD_H_SEEN__
9 kx
9 kx #ifdef __cplusplus
9 kx extern "C" {
9 kx #endif
9 kx
9 kx #include "ansidecl.h"
9 kx #include "symcat.h"
9 kx #include <stdint.h>
9 kx #include <stdbool.h>
9 kx #include "diagnostics.h"
9 kx #include <stdarg.h>
9 kx #include <string.h>
9 kx #include <sys/stat.h>
9 kx
9 kx #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
9 kx #ifndef SABER
9 kx /* This hack is to avoid a problem with some strict ANSI C preprocessors.
9 kx The problem is, "32_" is not a valid preprocessing token, and we don't
9 kx want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
9 kx cause the inner CONCAT2 macros to be evaluated first, producing
9 kx still-valid pp-tokens. Then the final concatenation can be done. */
9 kx #undef CONCAT4
9 kx #define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
9 kx #endif
9 kx #endif
9 kx
9 kx /* This is a utility macro to handle the situation where the code
9 kx wants to place a constant string into the code, followed by a
9 kx comma and then the length of the string. Doing this by hand
9 kx is error prone, so using this macro is safer. */
9 kx #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
9 kx
9 kx #define BFD_SUPPORTS_PLUGINS @supports_plugins@
9 kx
9 kx /* The word size used by BFD on the host. This may be 64 with a 32
9 kx bit target if the host is 64 bit, or if other 64 bit targets have
9 kx been selected with --enable-targets, or if --enable-64-bit-bfd. */
9 kx #define BFD_ARCH_SIZE @wordsize@
9 kx
9 kx /* The word size of the default bfd target. */
9 kx #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
9 kx
9 kx #include <inttypes.h>
9 kx
9 kx #if BFD_ARCH_SIZE >= 64
9 kx #define BFD64
9 kx #endif
9 kx
9 kx /* Forward declaration. */
9 kx typedef struct bfd bfd;
9 kx
9 kx /* Boolean type used in bfd.
9 kx General rule: Functions which are bfd_boolean return TRUE on
9 kx success and FALSE on failure (unless they're a predicate). */
9 kx
9 kx #ifdef POISON_BFD_BOOLEAN
9 kx # pragma GCC poison bfd_boolean
9 kx #else
9 kx # define bfd_boolean bool
9 kx # undef FALSE
9 kx # undef TRUE
9 kx # define FALSE 0
9 kx # define TRUE 1
9 kx #endif
9 kx
9 kx /* Silence "applying zero offset to null pointer" UBSAN warnings. */
9 kx #define PTR_ADD(P,A) ((A) != 0 ? (P) + (A) : (P))
9 kx /* Also prevent non-zero offsets from being applied to a null pointer. */
9 kx #define NPTR_ADD(P,A) ((P) != NULL ? (P) + (A) : (P))
9 kx
9 kx #ifdef BFD64
9 kx
9 kx /* Represent a target address. Also used as a generic unsigned type
9 kx which is guaranteed to be big enough to hold any arithmetic types
9 kx we need to deal with. */
9 kx typedef uint64_t bfd_vma;
9 kx
9 kx /* A generic signed type which is guaranteed to be big enough to hold any
9 kx arithmetic types we need to deal with. Can be assumed to be compatible
9 kx with bfd_vma in the same way that signed and unsigned ints are compatible
9 kx (as parameters, in assignment, etc). */
9 kx typedef int64_t bfd_signed_vma;
9 kx
9 kx typedef uint64_t bfd_size_type;
9 kx typedef uint64_t symvalue;
9 kx
9 kx #else /* not BFD64 */
9 kx
9 kx typedef unsigned long bfd_vma;
9 kx typedef long bfd_signed_vma;
9 kx typedef unsigned long symvalue;
9 kx typedef unsigned long bfd_size_type;
9 kx
9 kx #endif /* not BFD64 */
9 kx
9 kx #define HALF_BFD_SIZE_TYPE \
9 kx (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
9 kx
9 kx /* An offset into a file. BFD always uses the largest possible offset
9 kx based on the build time availability of fseek, fseeko, or fseeko64. */
9 kx typedef @bfd_file_ptr@ file_ptr;
9 kx typedef @bfd_ufile_ptr@ ufile_ptr;
9 kx
9 kx extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
9 kx extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
9 kx
9 kx #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
9 kx
9 kx typedef unsigned int flagword; /* 32 bits of flags */
9 kx typedef unsigned char bfd_byte;
9 kx
9 kx /* File formats. */
9 kx
9 kx typedef enum bfd_format
9 kx {
9 kx bfd_unknown = 0, /* File format is unknown. */
9 kx bfd_object, /* Linker/assembler/compiler output. */
9 kx bfd_archive, /* Object archive file. */
9 kx bfd_core, /* Core dump. */
9 kx bfd_type_end /* Marks the end; don't use it! */
9 kx }
9 kx bfd_format;
9 kx
9 kx /* Symbols and relocation. */
9 kx
9 kx /* A count of carsyms (canonical archive symbols). */
9 kx typedef unsigned long symindex;
9 kx
9 kx #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
9 kx
9 kx /* A canonical archive symbol. */
9 kx /* This is a type pun with struct ranlib on purpose! */
9 kx typedef struct carsym
9 kx {
9 kx const char *name;
9 kx file_ptr file_offset; /* Look here to find the file. */
9 kx }
9 kx carsym; /* To make these you call a carsymogen. */
9 kx
9 kx /* Used in generating armaps (archive tables of contents).
9 kx Perhaps just a forward definition would do? */
9 kx struct orl /* Output ranlib. */
9 kx {
9 kx char **name; /* Symbol name. */
9 kx union
9 kx {
9 kx file_ptr pos;
9 kx bfd *abfd;
9 kx } u; /* bfd* or file position. */
9 kx int namidx; /* Index into string table. */
9 kx };
9 kx
9 kx /* Linenumber stuff. */
9 kx typedef struct lineno_cache_entry
9 kx {
9 kx unsigned int line_number; /* Linenumber from start of function. */
9 kx union
9 kx {
9 kx struct bfd_symbol *sym; /* Function name. */
9 kx bfd_vma offset; /* Offset into section. */
9 kx } u;
9 kx }
9 kx alent;
9 kx
9 kx /* Object and core file sections. */
9 kx typedef struct bfd_section *sec_ptr;
9 kx
9 kx #define align_power(addr, align) \
9 kx (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
9 kx
9 kx /* Align an address upward to a boundary, expressed as a number of bytes.
9 kx E.g. align to an 8-byte boundary with argument of 8. Take care never
9 kx to wrap around if the address is within boundary-1 of the end of the
9 kx address space. */
9 kx #define BFD_ALIGN(this, boundary) \
9 kx ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
9 kx ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
9 kx : ~ (bfd_vma) 0)
9 kx
9 kx typedef enum bfd_print_symbol
9 kx {
9 kx bfd_print_symbol_name,
9 kx bfd_print_symbol_more,
9 kx bfd_print_symbol_all
9 kx } bfd_print_symbol_type;
9 kx
9 kx /* Information about a symbol that nm needs. */
9 kx
9 kx typedef struct _symbol_info
9 kx {
9 kx symvalue value;
9 kx char type;
9 kx const char *name; /* Symbol name. */
9 kx unsigned char stab_type; /* Stab type. */
9 kx char stab_other; /* Stab other. */
9 kx short stab_desc; /* Stab desc. */
9 kx const char *stab_name; /* String for stab type. */
9 kx } symbol_info;
9 kx
9 kx /* Get the name of a stabs type code. */
9 kx
9 kx extern const char *bfd_get_stab_name (int);
9 kx
9 kx /* Hash table routines. There is no way to free up a hash table. */
9 kx
9 kx /* An element in the hash table. Most uses will actually use a larger
9 kx structure, and an instance of this will be the first field. */
9 kx
9 kx struct bfd_hash_entry
9 kx {
9 kx /* Next entry for this hash code. */
9 kx struct bfd_hash_entry *next;
9 kx /* String being hashed. */
9 kx const char *string;
9 kx /* Hash code. This is the full hash code, not the index into the
9 kx table. */
9 kx unsigned long hash;
9 kx };
9 kx
9 kx /* A hash table. */
9 kx
9 kx struct bfd_hash_table
9 kx {
9 kx /* The hash array. */
9 kx struct bfd_hash_entry **table;
9 kx /* A function used to create new elements in the hash table. The
9 kx first entry is itself a pointer to an element. When this
9 kx function is first invoked, this pointer will be NULL. However,
9 kx having the pointer permits a hierarchy of method functions to be
9 kx built each of which calls the function in the superclass. Thus
9 kx each function should be written to allocate a new block of memory
9 kx only if the argument is NULL. */
9 kx struct bfd_hash_entry *(*newfunc)
9 kx (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
9 kx /* An objalloc for this hash table. This is a struct objalloc *,
9 kx but we use void * to avoid requiring the inclusion of objalloc.h. */
9 kx void *memory;
9 kx /* The number of slots in the hash table. */
9 kx unsigned int size;
9 kx /* The number of entries in the hash table. */
9 kx unsigned int count;
9 kx /* The size of elements. */
9 kx unsigned int entsize;
9 kx /* If non-zero, don't grow the hash table. */
9 kx unsigned int frozen:1;
9 kx };
9 kx
9 kx /* Initialize a hash table. */
9 kx extern bool bfd_hash_table_init
9 kx (struct bfd_hash_table *,
9 kx struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
9 kx struct bfd_hash_table *,
9 kx const char *),
9 kx unsigned int);
9 kx
9 kx /* Initialize a hash table specifying a size. */
9 kx extern bool bfd_hash_table_init_n
9 kx (struct bfd_hash_table *,
9 kx struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
9 kx struct bfd_hash_table *,
9 kx const char *),
9 kx unsigned int, unsigned int);
9 kx
9 kx /* Free up a hash table. */
9 kx extern void bfd_hash_table_free
9 kx (struct bfd_hash_table *);
9 kx
9 kx /* Look up a string in a hash table. If CREATE is TRUE, a new entry
9 kx will be created for this string if one does not already exist. The
9 kx COPY argument must be TRUE if this routine should copy the string
9 kx into newly allocated memory when adding an entry. */
9 kx extern struct bfd_hash_entry *bfd_hash_lookup
9 kx (struct bfd_hash_table *, const char *, bool create, bool copy);
9 kx
9 kx /* Insert an entry in a hash table. */
9 kx extern struct bfd_hash_entry *bfd_hash_insert
9 kx (struct bfd_hash_table *, const char *, unsigned long);
9 kx
9 kx /* Rename an entry in a hash table. */
9 kx extern void bfd_hash_rename
9 kx (struct bfd_hash_table *, const char *, struct bfd_hash_entry *);
9 kx
9 kx /* Replace an entry in a hash table. */
9 kx extern void bfd_hash_replace
9 kx (struct bfd_hash_table *, struct bfd_hash_entry *old,
9 kx struct bfd_hash_entry *nw);
9 kx
9 kx /* Base method for creating a hash table entry. */
9 kx extern struct bfd_hash_entry *bfd_hash_newfunc
9 kx (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
9 kx
9 kx /* Grab some space for a hash table entry. */
9 kx extern void *bfd_hash_allocate
9 kx (struct bfd_hash_table *, unsigned int);
9 kx
9 kx /* Traverse a hash table in a random order, calling a function on each
9 kx element. If the function returns FALSE, the traversal stops. The
9 kx INFO argument is passed to the function. */
9 kx extern void bfd_hash_traverse
9 kx (struct bfd_hash_table *,
9 kx bool (*) (struct bfd_hash_entry *, void *),
9 kx void *info);
9 kx
9 kx /* Allows the default size of a hash table to be configured. New hash
9 kx tables allocated using bfd_hash_table_init will be created with
9 kx this size. */
9 kx extern unsigned long bfd_hash_set_default_size (unsigned long);
9 kx
9 kx /* This structure is used to keep track of stabs in sections
9 kx information while linking. */
9 kx
9 kx struct stab_info
9 kx {
9 kx /* A hash table used to hold stabs strings. */
9 kx struct bfd_strtab_hash *strings;
9 kx /* The header file hash table. */
9 kx struct bfd_hash_table includes;
9 kx /* The first .stabstr section. */
9 kx struct bfd_section *stabstr;
9 kx };
9 kx
9 kx #define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
9 kx
9 kx /* User program access to BFD facilities. */
9 kx
9 kx /* Direct I/O routines, for programs which know more about the object
9 kx file than BFD does. Use higher level routines if possible. */
9 kx
9 kx extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
9 kx extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
9 kx extern int bfd_seek (bfd *, file_ptr, int);
9 kx extern file_ptr bfd_tell (bfd *);
9 kx extern int bfd_flush (bfd *);
9 kx extern int bfd_stat (bfd *, struct stat *);
9 kx
9 kx /* Deprecated old routines. */
9 kx #if __GNUC__
9 kx #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
9 kx (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
9 kx bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
9 kx #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
9 kx (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
9 kx bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
9 kx #else
9 kx #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
9 kx (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
9 kx bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
9 kx #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
9 kx (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
9 kx bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
9 kx #endif
9 kx extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
9 kx
9 kx extern bool bfd_cache_close
9 kx (bfd *abfd);
9 kx /* NB: This declaration should match the autogenerated one in libbfd.h. */
9 kx
9 kx extern bool bfd_cache_close_all (void);
9 kx
9 kx extern bool bfd_record_phdr
9 kx (bfd *, unsigned long, bool, flagword, bool, bfd_vma,
9 kx bool, bool, unsigned int, struct bfd_section **);
9 kx
9 kx /* Byte swapping routines. */
9 kx
9 kx uint64_t bfd_getb64 (const void *);
9 kx uint64_t bfd_getl64 (const void *);
9 kx int64_t bfd_getb_signed_64 (const void *);
9 kx int64_t bfd_getl_signed_64 (const void *);
9 kx bfd_vma bfd_getb32 (const void *);
9 kx bfd_vma bfd_getl32 (const void *);
9 kx bfd_signed_vma bfd_getb_signed_32 (const void *);
9 kx bfd_signed_vma bfd_getl_signed_32 (const void *);
9 kx bfd_vma bfd_getb16 (const void *);
9 kx bfd_vma bfd_getl16 (const void *);
9 kx bfd_signed_vma bfd_getb_signed_16 (const void *);
9 kx bfd_signed_vma bfd_getl_signed_16 (const void *);
9 kx void bfd_putb64 (uint64_t, void *);
9 kx void bfd_putl64 (uint64_t, void *);
9 kx void bfd_putb32 (bfd_vma, void *);
9 kx void bfd_putl32 (bfd_vma, void *);
9 kx void bfd_putb24 (bfd_vma, void *);
9 kx void bfd_putl24 (bfd_vma, void *);
9 kx void bfd_putb16 (bfd_vma, void *);
9 kx void bfd_putl16 (bfd_vma, void *);
9 kx
9 kx /* Byte swapping routines which take size and endiannes as arguments. */
9 kx
9 kx uint64_t bfd_get_bits (const void *, int, bool);
9 kx void bfd_put_bits (uint64_t, void *, int, bool);
9 kx
9 kx
9 kx /* mmap hacks */
9 kx
9 kx struct _bfd_window_internal;
9 kx typedef struct _bfd_window_internal bfd_window_internal;
9 kx
9 kx typedef struct _bfd_window
9 kx {
9 kx /* What the user asked for. */
9 kx void *data;
9 kx bfd_size_type size;
9 kx /* The actual window used by BFD. Small user-requested read-only
9 kx regions sharing a page may share a single window into the object
9 kx file. Read-write versions shouldn't until I've fixed things to
9 kx keep track of which portions have been claimed by the
9 kx application; don't want to give the same region back when the
9 kx application wants two writable copies! */
9 kx struct _bfd_window_internal *i;
9 kx }
9 kx bfd_window;
9 kx
9 kx extern void bfd_init_window
9 kx (bfd_window *);
9 kx extern void bfd_free_window
9 kx (bfd_window *);
9 kx extern bool bfd_get_file_window
9 kx (bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
9 kx
9 kx /* Externally visible ELF routines. */
9 kx
9 kx /* Create a new BFD as if by bfd_openr. Rather than opening a file,
9 kx reconstruct an ELF file by reading the segments out of remote
9 kx memory based on the ELF file header at EHDR_VMA and the ELF program
9 kx headers it points to. If non-zero, SIZE is the known extent of the
9 kx object. If not null, *LOADBASEP is filled in with the difference
9 kx between the VMAs from which the segments were read, and the VMAs
9 kx the file headers (and hence BFD's idea of each section's VMA) put
9 kx them at.
9 kx
9 kx The function TARGET_READ_MEMORY is called to copy LEN bytes from
9 kx the remote memory at target address VMA into the local buffer at
9 kx MYADDR; it should return zero on success or an `errno' code on
9 kx failure. TEMPL must be a BFD for a target with the word size and
9 kx byte order found in the remote memory. */
9 kx extern bfd *bfd_elf_bfd_from_remote_memory
9 kx (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep,
9 kx int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr,
9 kx bfd_size_type len));
9 kx
9 kx /* Forward declarations. */
9 kx struct ecoff_debug_info;
9 kx struct ecoff_debug_swap;
9 kx struct ecoff_extr;
9 kx struct bfd_link_info;
9 kx struct bfd_link_hash_entry;
9 kx
9 kx /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */
9 kx
9 kx static inline bool
9 kx startswith (const char *str, const char *prefix)
9 kx {
9 kx return strncmp (str, prefix, strlen (prefix)) == 0;
9 kx }
9 kx /* Extracted from init.c. */
9 kx unsigned int bfd_init (void);
9 kx
9 kx
9 kx /* Value returned by bfd_init. */
9 kx
9 kx #define BFD_INIT_MAGIC (sizeof (struct bfd_section))
9 kx /* Extracted from opncls.c. */
9 kx /* Set to N to open the next N BFDs using an alternate id space. */
9 kx extern unsigned int bfd_use_reserved_id;
9 kx bfd *bfd_fopen (const char *filename, const char *target,
9 kx const char *mode, int fd);
9 kx
9 kx bfd *bfd_openr (const char *filename, const char *target);
9 kx
9 kx bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
9 kx
9 kx bfd *bfd_fdopenw (const char *filename, const char *target, int fd);
9 kx
9 kx bfd *bfd_openstreamr (const char * filename, const char * target,
9 kx void * stream);
9 kx
9 kx bfd *bfd_openr_iovec (const char *filename, const char *target,
9 kx void *(*open_func) (struct bfd *nbfd,
9 kx void *open_closure),
9 kx void *open_closure,
9 kx file_ptr (*pread_func) (struct bfd *nbfd,
9 kx void *stream,
9 kx void *buf,
9 kx file_ptr nbytes,
9 kx file_ptr offset),
9 kx int (*close_func) (struct bfd *nbfd,
9 kx void *stream),
9 kx int (*stat_func) (struct bfd *abfd,
9 kx void *stream,
9 kx struct stat *sb));
9 kx
9 kx bfd *bfd_openw (const char *filename, const char *target);
9 kx
9 kx bool bfd_close (bfd *abfd);
9 kx
9 kx bool bfd_close_all_done (bfd *);
9 kx
9 kx bfd *bfd_create (const char *filename, bfd *templ);
9 kx
9 kx bool bfd_make_writable (bfd *abfd);
9 kx
9 kx bool bfd_make_readable (bfd *abfd);
9 kx
9 kx void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
9 kx
9 kx void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
9 kx
9 kx unsigned long bfd_calc_gnu_debuglink_crc32
9 kx (unsigned long crc, const unsigned char *buf, bfd_size_type len);
9 kx
9 kx char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
9 kx
9 kx char *bfd_get_alt_debug_link_info (bfd * abfd,
9 kx bfd_size_type *buildid_len,
9 kx bfd_byte **buildid_out);
9 kx
9 kx char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
9 kx
9 kx char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
9 kx
9 kx struct bfd_section *bfd_create_gnu_debuglink_section
9 kx (bfd *abfd, const char *filename);
9 kx
9 kx bool bfd_fill_in_gnu_debuglink_section
9 kx (bfd *abfd, struct bfd_section *sect, const char *filename);
9 kx
9 kx char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
9 kx
9 kx const char *bfd_set_filename (bfd *abfd, const char *filename);
9 kx
9 kx /* Extracted from libbfd.c. */
9 kx
9 kx /* Byte swapping macros for user section data. */
9 kx
9 kx #define bfd_put_8(abfd, val, ptr) \
9 kx ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
9 kx #define bfd_put_signed_8 \
9 kx bfd_put_8
9 kx #define bfd_get_8(abfd, ptr) \
9 kx ((bfd_vma) *(const unsigned char *) (ptr) & 0xff)
9 kx #define bfd_get_signed_8(abfd, ptr) \
9 kx ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
9 kx
9 kx #define bfd_put_16(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
9 kx #define bfd_put_signed_16 \
9 kx bfd_put_16
9 kx #define bfd_get_16(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx16, (ptr))
9 kx #define bfd_get_signed_16(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
9 kx
9 kx #define bfd_put_24(abfd, val, ptr) \
9 kx do \
9 kx if (bfd_big_endian (abfd)) \
9 kx bfd_putb24 ((val), (ptr)); \
9 kx else \
9 kx bfd_putl24 ((val), (ptr)); \
9 kx while (0)
9 kx
9 kx bfd_vma bfd_getb24 (const void *p);
9 kx bfd_vma bfd_getl24 (const void *p);
9 kx
9 kx #define bfd_get_24(abfd, ptr) \
9 kx (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
9 kx
9 kx #define bfd_put_32(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
9 kx #define bfd_put_signed_32 \
9 kx bfd_put_32
9 kx #define bfd_get_32(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx32, (ptr))
9 kx #define bfd_get_signed_32(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
9 kx
9 kx #define bfd_put_64(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
9 kx #define bfd_put_signed_64 \
9 kx bfd_put_64
9 kx #define bfd_get_64(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx64, (ptr))
9 kx #define bfd_get_signed_64(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
9 kx
9 kx #define bfd_get(bits, abfd, ptr) \
9 kx ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
9 kx : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
9 kx : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
9 kx : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
9 kx : (abort (), (bfd_vma) - 1))
9 kx
9 kx #define bfd_put(bits, abfd, val, ptr) \
9 kx ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
9 kx : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
9 kx : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
9 kx : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
9 kx : (abort (), (void) 0))
9 kx
9 kx
9 kx /* Byte swapping macros for file header data. */
9 kx
9 kx #define bfd_h_put_8(abfd, val, ptr) \
9 kx bfd_put_8 (abfd, val, ptr)
9 kx #define bfd_h_put_signed_8(abfd, val, ptr) \
9 kx bfd_put_8 (abfd, val, ptr)
9 kx #define bfd_h_get_8(abfd, ptr) \
9 kx bfd_get_8 (abfd, ptr)
9 kx #define bfd_h_get_signed_8(abfd, ptr) \
9 kx bfd_get_signed_8 (abfd, ptr)
9 kx
9 kx #define bfd_h_put_16(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
9 kx #define bfd_h_put_signed_16 \
9 kx bfd_h_put_16
9 kx #define bfd_h_get_16(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx16, (ptr))
9 kx #define bfd_h_get_signed_16(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
9 kx
9 kx #define bfd_h_put_32(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
9 kx #define bfd_h_put_signed_32 \
9 kx bfd_h_put_32
9 kx #define bfd_h_get_32(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx32, (ptr))
9 kx #define bfd_h_get_signed_32(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
9 kx
9 kx #define bfd_h_put_64(abfd, val, ptr) \
9 kx BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
9 kx #define bfd_h_put_signed_64 \
9 kx bfd_h_put_64
9 kx #define bfd_h_get_64(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx64, (ptr))
9 kx #define bfd_h_get_signed_64(abfd, ptr) \
9 kx BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
9 kx
9 kx /* Aliases for the above, which should eventually go away. */
9 kx
9 kx #define H_PUT_64 bfd_h_put_64
9 kx #define H_PUT_32 bfd_h_put_32
9 kx #define H_PUT_16 bfd_h_put_16
9 kx #define H_PUT_8 bfd_h_put_8
9 kx #define H_PUT_S64 bfd_h_put_signed_64
9 kx #define H_PUT_S32 bfd_h_put_signed_32
9 kx #define H_PUT_S16 bfd_h_put_signed_16
9 kx #define H_PUT_S8 bfd_h_put_signed_8
9 kx #define H_GET_64 bfd_h_get_64
9 kx #define H_GET_32 bfd_h_get_32
9 kx #define H_GET_16 bfd_h_get_16
9 kx #define H_GET_8 bfd_h_get_8
9 kx #define H_GET_S64 bfd_h_get_signed_64
9 kx #define H_GET_S32 bfd_h_get_signed_32
9 kx #define H_GET_S16 bfd_h_get_signed_16
9 kx #define H_GET_S8 bfd_h_get_signed_8
9 kx
9 kx
9 kx /* Extracted from bfdio.c. */
9 kx long bfd_get_mtime (bfd *abfd);
9 kx
9 kx ufile_ptr bfd_get_size (bfd *abfd);
9 kx
9 kx ufile_ptr bfd_get_file_size (bfd *abfd);
9 kx
9 kx void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
9 kx int prot, int flags, file_ptr offset,
9 kx void **map_addr, bfd_size_type *map_len);
9 kx
9 kx /* Extracted from bfdwin.c. */
9 kx /* Extracted from section.c. */
9 kx
9 kx typedef struct bfd_section
9 kx {
9 kx /* The name of the section; the name isn't a copy, the pointer is
9 kx the same as that passed to bfd_make_section. */
9 kx const char *name;
9 kx
9 kx /* The next section in the list belonging to the BFD, or NULL. */
9 kx struct bfd_section *next;
9 kx
9 kx /* The previous section in the list belonging to the BFD, or NULL. */
9 kx struct bfd_section *prev;
9 kx
9 kx /* A unique sequence number. */
9 kx unsigned int id;
9 kx
9 kx /* A unique section number which can be used by assembler to
9 kx distinguish different sections with the same section name. */
9 kx unsigned int section_id;
9 kx
9 kx /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
9 kx unsigned int index;
9 kx
9 kx /* The field flags contains attributes of the section. Some
9 kx flags are read in from the object file, and some are
9 kx synthesized from other information. */
9 kx flagword flags;
9 kx
9 kx #define SEC_NO_FLAGS 0x0
9 kx
9 kx /* Tells the OS to allocate space for this section when loading.
9 kx This is clear for a section containing debug information only. */
9 kx #define SEC_ALLOC 0x1
9 kx
9 kx /* Tells the OS to load the section from the file when loading.
9 kx This is clear for a .bss section. */
9 kx #define SEC_LOAD 0x2
9 kx
9 kx /* The section contains data still to be relocated, so there is
9 kx some relocation information too. */
9 kx #define SEC_RELOC 0x4
9 kx
9 kx /* A signal to the OS that the section contains read only data. */
9 kx #define SEC_READONLY 0x8
9 kx
9 kx /* The section contains code only. */
9 kx #define SEC_CODE 0x10
9 kx
9 kx /* The section contains data only. */
9 kx #define SEC_DATA 0x20
9 kx
9 kx /* The section will reside in ROM. */
9 kx #define SEC_ROM 0x40
9 kx
9 kx /* The section contains constructor information. This section
9 kx type is used by the linker to create lists of constructors and
9 kx destructors used by <<g++>>. When a back end sees a symbol
9 kx which should be used in a constructor list, it creates a new
9 kx section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
9 kx the symbol to it, and builds a relocation. To build the lists
9 kx of constructors, all the linker has to do is catenate all the
9 kx sections called <<__CTOR_LIST__>> and relocate the data
9 kx contained within - exactly the operations it would peform on
9 kx standard data. */
9 kx #define SEC_CONSTRUCTOR 0x80
9 kx
9 kx /* The section has contents - a data section could be
9 kx <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
9 kx <<SEC_HAS_CONTENTS>> */
9 kx #define SEC_HAS_CONTENTS 0x100
9 kx
9 kx /* An instruction to the linker to not output the section
9 kx even if it has information which would normally be written. */
9 kx #define SEC_NEVER_LOAD 0x200
9 kx
9 kx /* The section contains thread local data. */
9 kx #define SEC_THREAD_LOCAL 0x400
9 kx
9 kx /* The section's size is fixed. Generic linker code will not
9 kx recalculate it and it is up to whoever has set this flag to
9 kx get the size right. */
9 kx #define SEC_FIXED_SIZE 0x800
9 kx
9 kx /* The section contains common symbols (symbols may be defined
9 kx multiple times, the value of a symbol is the amount of
9 kx space it requires, and the largest symbol value is the one
9 kx used). Most targets have exactly one of these (which we
9 kx translate to bfd_com_section_ptr), but ECOFF has two. */
9 kx #define SEC_IS_COMMON 0x1000
9 kx
9 kx /* The section contains only debugging information. For
9 kx example, this is set for ELF .debug and .stab sections.
9 kx strip tests this flag to see if a section can be
9 kx discarded. */
9 kx #define SEC_DEBUGGING 0x2000
9 kx
9 kx /* The contents of this section are held in memory pointed to
9 kx by the contents field. This is checked by bfd_get_section_contents,
9 kx and the data is retrieved from memory if appropriate. */
9 kx #define SEC_IN_MEMORY 0x4000
9 kx
9 kx /* The contents of this section are to be excluded by the
9 kx linker for executable and shared objects unless those
9 kx objects are to be further relocated. */
9 kx #define SEC_EXCLUDE 0x8000
9 kx
9 kx /* The contents of this section are to be sorted based on the sum of
9 kx the symbol and addend values specified by the associated relocation
9 kx entries. Entries without associated relocation entries will be
9 kx appended to the end of the section in an unspecified order. */
9 kx #define SEC_SORT_ENTRIES 0x10000
9 kx
9 kx /* When linking, duplicate sections of the same name should be
9 kx discarded, rather than being combined into a single section as
9 kx is usually done. This is similar to how common symbols are
9 kx handled. See SEC_LINK_DUPLICATES below. */
9 kx #define SEC_LINK_ONCE 0x20000
9 kx
9 kx /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
9 kx should handle duplicate sections. */
9 kx #define SEC_LINK_DUPLICATES 0xc0000
9 kx
9 kx /* This value for SEC_LINK_DUPLICATES means that duplicate
9 kx sections with the same name should simply be discarded. */
9 kx #define SEC_LINK_DUPLICATES_DISCARD 0x0
9 kx
9 kx /* This value for SEC_LINK_DUPLICATES means that the linker
9 kx should warn if there are any duplicate sections, although
9 kx it should still only link one copy. */
9 kx #define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
9 kx
9 kx /* This value for SEC_LINK_DUPLICATES means that the linker
9 kx should warn if any duplicate sections are a different size. */
9 kx #define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
9 kx
9 kx /* This value for SEC_LINK_DUPLICATES means that the linker
9 kx should warn if any duplicate sections contain different
9 kx contents. */
9 kx #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
9 kx (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
9 kx
9 kx /* This section was created by the linker as part of dynamic
9 kx relocation or other arcane processing. It is skipped when
9 kx going through the first-pass output, trusting that someone
9 kx else up the line will take care of it later. */
9 kx #define SEC_LINKER_CREATED 0x100000
9 kx
9 kx /* This section contains a section ID to distinguish different
9 kx sections with the same section name. */
9 kx #define SEC_ASSEMBLER_SECTION_ID 0x100000
9 kx
9 kx /* This section should not be subject to garbage collection.
9 kx Also set to inform the linker that this section should not be
9 kx listed in the link map as discarded. */
9 kx #define SEC_KEEP 0x200000
9 kx
9 kx /* This section contains "short" data, and should be placed
9 kx "near" the GP. */
9 kx #define SEC_SMALL_DATA 0x400000
9 kx
9 kx /* Attempt to merge identical entities in the section.
9 kx Entity size is given in the entsize field. */
9 kx #define SEC_MERGE 0x800000
9 kx
9 kx /* If given with SEC_MERGE, entities to merge are zero terminated
9 kx strings where entsize specifies character size instead of fixed
9 kx size entries. */
9 kx #define SEC_STRINGS 0x1000000
9 kx
9 kx /* This section contains data about section groups. */
9 kx #define SEC_GROUP 0x2000000
9 kx
9 kx /* The section is a COFF shared library section. This flag is
9 kx only for the linker. If this type of section appears in
9 kx the input file, the linker must copy it to the output file
9 kx without changing the vma or size. FIXME: Although this
9 kx was originally intended to be general, it really is COFF
9 kx specific (and the flag was renamed to indicate this). It
9 kx might be cleaner to have some more general mechanism to
9 kx allow the back end to control what the linker does with
9 kx sections. */
9 kx #define SEC_COFF_SHARED_LIBRARY 0x4000000
9 kx
9 kx /* This input section should be copied to output in reverse order
9 kx as an array of pointers. This is for ELF linker internal use
9 kx only. */
9 kx #define SEC_ELF_REVERSE_COPY 0x4000000
9 kx
9 kx /* This section contains data which may be shared with other
9 kx executables or shared objects. This is for COFF only. */
9 kx #define SEC_COFF_SHARED 0x8000000
9 kx
9 kx /* Indicate that section has the purecode flag set. */
9 kx #define SEC_ELF_PURECODE 0x8000000
9 kx
9 kx /* When a section with this flag is being linked, then if the size of
9 kx the input section is less than a page, it should not cross a page
9 kx boundary. If the size of the input section is one page or more,
9 kx it should be aligned on a page boundary. This is for TI
9 kx TMS320C54X only. */
9 kx #define SEC_TIC54X_BLOCK 0x10000000
9 kx
9 kx /* Conditionally link this section; do not link if there are no
9 kx references found to any symbol in the section. This is for TI
9 kx TMS320C54X only. */
9 kx #define SEC_TIC54X_CLINK 0x20000000
9 kx
9 kx /* This section contains vliw code. This is for Toshiba MeP only. */
9 kx #define SEC_MEP_VLIW 0x20000000
9 kx
9 kx /* All symbols, sizes and relocations in this section are octets
9 kx instead of bytes. Required for DWARF debug sections as DWARF
9 kx information is organized in octets, not bytes. */
9 kx #define SEC_ELF_OCTETS 0x40000000
9 kx
9 kx /* Indicate that section has the no read flag set. This happens
9 kx when memory read flag isn't set. */
9 kx #define SEC_COFF_NOREAD 0x40000000
9 kx
9 kx /* End of section flags. */
9 kx
9 kx /* Some internal packed boolean fields. */
9 kx
9 kx /* See the vma field. */
9 kx unsigned int user_set_vma : 1;
9 kx
9 kx /* A mark flag used by some of the linker backends. */
9 kx unsigned int linker_mark : 1;
9 kx
9 kx /* Another mark flag used by some of the linker backends. Set for
9 kx output sections that have an input section. */
9 kx unsigned int linker_has_input : 1;
9 kx
9 kx /* Mark flag used by some linker backends for garbage collection. */
9 kx unsigned int gc_mark : 1;
9 kx
9 kx /* Section compression status. */
9 kx unsigned int compress_status : 2;
9 kx #define COMPRESS_SECTION_NONE 0
9 kx #define COMPRESS_SECTION_DONE 1
9 kx #define DECOMPRESS_SECTION_ZLIB 2
9 kx #define DECOMPRESS_SECTION_ZSTD 3
9 kx
9 kx /* The following flags are used by the ELF linker. */
9 kx
9 kx /* Mark sections which have been allocated to segments. */
9 kx unsigned int segment_mark : 1;
9 kx
9 kx /* Type of sec_info information. */
9 kx unsigned int sec_info_type:3;
9 kx #define SEC_INFO_TYPE_NONE 0
9 kx #define SEC_INFO_TYPE_STABS 1
9 kx #define SEC_INFO_TYPE_MERGE 2
9 kx #define SEC_INFO_TYPE_EH_FRAME 3
9 kx #define SEC_INFO_TYPE_JUST_SYMS 4
9 kx #define SEC_INFO_TYPE_TARGET 5
9 kx #define SEC_INFO_TYPE_EH_FRAME_ENTRY 6
9 kx #define SEC_INFO_TYPE_SFRAME 7
9 kx
9 kx /* Nonzero if this section uses RELA relocations, rather than REL. */
9 kx unsigned int use_rela_p:1;
9 kx
9 kx /* Bits used by various backends. The generic code doesn't touch
9 kx these fields. */
9 kx
9 kx unsigned int sec_flg0:1;
9 kx unsigned int sec_flg1:1;
9 kx unsigned int sec_flg2:1;
9 kx unsigned int sec_flg3:1;
9 kx unsigned int sec_flg4:1;
9 kx unsigned int sec_flg5:1;
9 kx
9 kx /* End of internal packed boolean fields. */
9 kx
9 kx /* The virtual memory address of the section - where it will be
9 kx at run time. The symbols are relocated against this. The
9 kx user_set_vma flag is maintained by bfd; if it's not set, the
9 kx backend can assign addresses (for example, in <<a.out>>, where
9 kx the default address for <<.data>> is dependent on the specific
9 kx target and various flags). */
9 kx bfd_vma vma;
9 kx
9 kx /* The load address of the section - where it would be in a
9 kx rom image; really only used for writing section header
9 kx information. */
9 kx bfd_vma lma;
9 kx
9 kx /* The size of the section in *octets*, as it will be output.
9 kx Contains a value even if the section has no contents (e.g., the
9 kx size of <<.bss>>). */
9 kx bfd_size_type size;
9 kx
9 kx /* For input sections, the original size on disk of the section, in
9 kx octets. This field should be set for any section whose size is
9 kx changed by linker relaxation. It is required for sections where
9 kx the linker relaxation scheme doesn't cache altered section and
9 kx reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
9 kx targets), and thus the original size needs to be kept to read the
9 kx section multiple times. For output sections, rawsize holds the
9 kx section size calculated on a previous linker relaxation pass. */
9 kx bfd_size_type rawsize;
9 kx
9 kx /* The compressed size of the section in octets. */
9 kx bfd_size_type compressed_size;
9 kx
9 kx /* If this section is going to be output, then this value is the
9 kx offset in *bytes* into the output section of the first byte in the
9 kx input section (byte ==> smallest addressable unit on the
9 kx target). In most cases, if this was going to start at the
9 kx 100th octet (8-bit quantity) in the output section, this value
9 kx would be 100. However, if the target byte size is 16 bits
9 kx (bfd_octets_per_byte is "2"), this value would be 50. */
9 kx bfd_vma output_offset;
9 kx
9 kx /* The output section through which to map on output. */
9 kx struct bfd_section *output_section;
9 kx
9 kx /* If an input section, a pointer to a vector of relocation
9 kx records for the data in this section. */
9 kx struct reloc_cache_entry *relocation;
9 kx
9 kx /* If an output section, a pointer to a vector of pointers to
9 kx relocation records for the data in this section. */
9 kx struct reloc_cache_entry **orelocation;
9 kx
9 kx /* The number of relocation records in one of the above. */
9 kx unsigned reloc_count;
9 kx
9 kx /* The alignment requirement of the section, as an exponent of 2 -
9 kx e.g., 3 aligns to 2^3 (or 8). */
9 kx unsigned int alignment_power;
9 kx
9 kx /* Information below is back end specific - and not always used
9 kx or updated. */
9 kx
9 kx /* File position of section data. */
9 kx file_ptr filepos;
9 kx
9 kx /* File position of relocation info. */
9 kx file_ptr rel_filepos;
9 kx
9 kx /* File position of line data. */
9 kx file_ptr line_filepos;
9 kx
9 kx /* Pointer to data for applications. */
9 kx void *userdata;
9 kx
9 kx /* If the SEC_IN_MEMORY flag is set, this points to the actual
9 kx contents. */
9 kx unsigned char *contents;
9 kx
9 kx /* Attached line number information. */
9 kx alent *lineno;
9 kx
9 kx /* Number of line number records. */
9 kx unsigned int lineno_count;
9 kx
9 kx /* Entity size for merging purposes. */
9 kx unsigned int entsize;
9 kx
9 kx /* Points to the kept section if this section is a link-once section,
9 kx and is discarded. */
9 kx struct bfd_section *kept_section;
9 kx
9 kx /* When a section is being output, this value changes as more
9 kx linenumbers are written out. */
9 kx file_ptr moving_line_filepos;
9 kx
9 kx /* What the section number is in the target world. */
9 kx int target_index;
9 kx
9 kx void *used_by_bfd;
9 kx
9 kx /* If this is a constructor section then here is a list of the
9 kx relocations created to relocate items within it. */
9 kx struct relent_chain *constructor_chain;
9 kx
9 kx /* The BFD which owns the section. */
9 kx bfd *owner;
9 kx
9 kx /* A symbol which points at this section only. */
9 kx struct bfd_symbol *symbol;
9 kx struct bfd_symbol **symbol_ptr_ptr;
9 kx
9 kx /* Early in the link process, map_head and map_tail are used to build
9 kx a list of input sections attached to an output section. Later,
9 kx output sections use these fields for a list of bfd_link_order
9 kx structs. The linked_to_symbol_name field is for ELF assembler
9 kx internal use. */
9 kx union {
9 kx struct bfd_link_order *link_order;
9 kx struct bfd_section *s;
9 kx const char *linked_to_symbol_name;
9 kx } map_head, map_tail;
9 kx
9 kx /* Points to the output section this section is already assigned to,
9 kx if any. This is used when support for non-contiguous memory
9 kx regions is enabled. */
9 kx struct bfd_section *already_assigned;
9 kx
9 kx /* Explicitly specified section type, if non-zero. */
9 kx unsigned int type;
9 kx
9 kx } asection;
9 kx
9 kx static inline const char *
9 kx bfd_section_name (const asection *sec)
9 kx {
9 kx return sec->name;
9 kx }
9 kx
9 kx static inline bfd_size_type
9 kx bfd_section_size (const asection *sec)
9 kx {
9 kx return sec->size;
9 kx }
9 kx
9 kx static inline bfd_vma
9 kx bfd_section_vma (const asection *sec)
9 kx {
9 kx return sec->vma;
9 kx }
9 kx
9 kx static inline bfd_vma
9 kx bfd_section_lma (const asection *sec)
9 kx {
9 kx return sec->lma;
9 kx }
9 kx
9 kx static inline unsigned int
9 kx bfd_section_alignment (const asection *sec)
9 kx {
9 kx return sec->alignment_power;
9 kx }
9 kx
9 kx static inline flagword
9 kx bfd_section_flags (const asection *sec)
9 kx {
9 kx return sec->flags;
9 kx }
9 kx
9 kx static inline void *
9 kx bfd_section_userdata (const asection *sec)
9 kx {
9 kx return sec->userdata;
9 kx }
9 kx static inline bool
9 kx bfd_is_com_section (const asection *sec)
9 kx {
9 kx return (sec->flags & SEC_IS_COMMON) != 0;
9 kx }
9 kx
9 kx /* Note: the following are provided as inline functions rather than macros
9 kx because not all callers use the return value. A macro implementation
9 kx would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
9 kx compilers will complain about comma expressions that have no effect. */
9 kx static inline bool
9 kx bfd_set_section_userdata (asection *sec, void *val)
9 kx {
9 kx sec->userdata = val;
9 kx return true;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_set_section_vma (asection *sec, bfd_vma val)
9 kx {
9 kx sec->vma = sec->lma = val;
9 kx sec->user_set_vma = true;
9 kx return true;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_set_section_lma (asection *sec, bfd_vma val)
9 kx {
9 kx sec->lma = val;
9 kx return true;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_set_section_alignment (asection *sec, unsigned int val)
9 kx {
9 kx if (val >= sizeof (bfd_vma) * 8 - 1)
9 kx return false;
9 kx sec->alignment_power = val;
9 kx return true;
9 kx }
9 kx
9 kx /* These sections are global, and are managed by BFD. The application
9 kx and target back end are not permitted to change the values in
9 kx these sections. */
9 kx extern asection _bfd_std_section[4];
9 kx
9 kx #define BFD_ABS_SECTION_NAME "*ABS*"
9 kx #define BFD_UND_SECTION_NAME "*UND*"
9 kx #define BFD_COM_SECTION_NAME "*COM*"
9 kx #define BFD_IND_SECTION_NAME "*IND*"
9 kx
9 kx /* Pointer to the common section. */
9 kx #define bfd_com_section_ptr (&_bfd_std_section[0])
9 kx /* Pointer to the undefined section. */
9 kx #define bfd_und_section_ptr (&_bfd_std_section[1])
9 kx /* Pointer to the absolute section. */
9 kx #define bfd_abs_section_ptr (&_bfd_std_section[2])
9 kx /* Pointer to the indirect section. */
9 kx #define bfd_ind_section_ptr (&_bfd_std_section[3])
9 kx
9 kx static inline bool
9 kx bfd_is_und_section (const asection *sec)
9 kx {
9 kx return sec == bfd_und_section_ptr;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_is_abs_section (const asection *sec)
9 kx {
9 kx return sec == bfd_abs_section_ptr;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_is_ind_section (const asection *sec)
9 kx {
9 kx return sec == bfd_ind_section_ptr;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_is_const_section (const asection *sec)
9 kx {
9 kx return (sec >= _bfd_std_section
9 kx && sec < _bfd_std_section + (sizeof (_bfd_std_section)
9 kx / sizeof (_bfd_std_section[0])));
9 kx }
9 kx
9 kx /* Return TRUE if input section SEC has been discarded. */
9 kx static inline bool
9 kx discarded_section (const asection *sec)
9 kx {
9 kx return (!bfd_is_abs_section (sec)
9 kx && bfd_is_abs_section (sec->output_section)
9 kx && sec->sec_info_type != SEC_INFO_TYPE_MERGE
9 kx && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS);
9 kx }
9 kx
9 kx #define BFD_FAKE_SECTION(SEC, SYM, NAME, IDX, FLAGS) \
9 kx /* name, next, prev, id, section_id, index, flags, user_set_vma, */ \
9 kx { NAME, NULL, NULL, IDX, 0, 0, FLAGS, 0, \
9 kx \
9 kx /* linker_mark, linker_has_input, gc_mark, decompress_status, */ \
9 kx 0, 0, 1, 0, \
9 kx \
9 kx /* segment_mark, sec_info_type, use_rela_p, */ \
9 kx 0, 0, 0, \
9 kx \
9 kx /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
9 kx 0, 0, 0, 0, 0, 0, \
9 kx \
9 kx /* vma, lma, size, rawsize, compressed_size, */ \
9 kx 0, 0, 0, 0, 0, \
9 kx \
9 kx /* output_offset, output_section, relocation, orelocation, */ \
9 kx 0, &SEC, NULL, NULL, \
9 kx \
9 kx /* reloc_count, alignment_power, filepos, rel_filepos, */ \
9 kx 0, 0, 0, 0, \
9 kx \
9 kx /* line_filepos, userdata, contents, lineno, lineno_count, */ \
9 kx 0, NULL, NULL, NULL, 0, \
9 kx \
9 kx /* entsize, kept_section, moving_line_filepos, */ \
9 kx 0, NULL, 0, \
9 kx \
9 kx /* target_index, used_by_bfd, constructor_chain, owner, */ \
9 kx 0, NULL, NULL, NULL, \
9 kx \
9 kx /* symbol, symbol_ptr_ptr, */ \
9 kx (struct bfd_symbol *) SYM, &SEC.symbol, \
9 kx \
9 kx /* map_head, map_tail, already_assigned, type */ \
9 kx { NULL }, { NULL }, NULL, 0 \
9 kx \
9 kx }
9 kx
9 kx /* We use a macro to initialize the static asymbol structures because
9 kx traditional C does not permit us to initialize a union member while
9 kx gcc warns if we don't initialize it.
9 kx the_bfd, name, value, attr, section [, udata] */
9 kx #ifdef __STDC__
9 kx #define GLOBAL_SYM_INIT(NAME, SECTION) \
9 kx { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
9 kx #else
9 kx #define GLOBAL_SYM_INIT(NAME, SECTION) \
9 kx { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
9 kx #endif
9 kx
9 kx void bfd_section_list_clear (bfd *);
9 kx
9 kx asection *bfd_get_section_by_name (bfd *abfd, const char *name);
9 kx
9 kx asection *bfd_get_next_section_by_name (bfd *ibfd, asection *sec);
9 kx
9 kx asection *bfd_get_linker_section (bfd *abfd, const char *name);
9 kx
9 kx asection *bfd_get_section_by_name_if
9 kx (bfd *abfd,
9 kx const char *name,
9 kx bool (*func) (bfd *abfd, asection *sect, void *obj),
9 kx void *obj);
9 kx
9 kx char *bfd_get_unique_section_name
9 kx (bfd *abfd, const char *templat, int *count);
9 kx
9 kx asection *bfd_make_section_old_way (bfd *abfd, const char *name);
9 kx
9 kx asection *bfd_make_section_anyway_with_flags
9 kx (bfd *abfd, const char *name, flagword flags);
9 kx
9 kx asection *bfd_make_section_anyway (bfd *abfd, const char *name);
9 kx
9 kx asection *bfd_make_section_with_flags
9 kx (bfd *, const char *name, flagword flags);
9 kx
9 kx asection *bfd_make_section (bfd *, const char *name);
9 kx
9 kx bool bfd_set_section_flags (asection *sec, flagword flags);
9 kx
9 kx void bfd_rename_section
9 kx (asection *sec, const char *newname);
9 kx
9 kx void bfd_map_over_sections
9 kx (bfd *abfd,
9 kx void (*func) (bfd *abfd, asection *sect, void *obj),
9 kx void *obj);
9 kx
9 kx asection *bfd_sections_find_if
9 kx (bfd *abfd,
9 kx bool (*operation) (bfd *abfd, asection *sect, void *obj),
9 kx void *obj);
9 kx
9 kx bool bfd_set_section_size (asection *sec, bfd_size_type val);
9 kx
9 kx bool bfd_set_section_contents
9 kx (bfd *abfd, asection *section, const void *data,
9 kx file_ptr offset, bfd_size_type count);
9 kx
9 kx bool bfd_get_section_contents
9 kx (bfd *abfd, asection *section, void *location, file_ptr offset,
9 kx bfd_size_type count);
9 kx
9 kx bool bfd_malloc_and_get_section
9 kx (bfd *abfd, asection *section, bfd_byte **buf);
9 kx
9 kx bool bfd_copy_private_section_data
9 kx (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
9 kx
9 kx #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
9 kx BFD_SEND (obfd, _bfd_copy_private_section_data, \
9 kx (ibfd, isection, obfd, osection))
9 kx bool bfd_generic_is_group_section (bfd *, const asection *sec);
9 kx
9 kx const char *bfd_generic_group_name (bfd *, const asection *sec);
9 kx
9 kx bool bfd_generic_discard_group (bfd *abfd, asection *group);
9 kx
9 kx /* Extracted from archures.c. */
9 kx enum bfd_architecture
9 kx {
9 kx bfd_arch_unknown, /* File arch not known. */
9 kx bfd_arch_obscure, /* Arch known, not one of these. */
9 kx bfd_arch_m68k, /* Motorola 68xxx. */
9 kx #define bfd_mach_m68000 1
9 kx #define bfd_mach_m68008 2
9 kx #define bfd_mach_m68010 3
9 kx #define bfd_mach_m68020 4
9 kx #define bfd_mach_m68030 5
9 kx #define bfd_mach_m68040 6
9 kx #define bfd_mach_m68060 7
9 kx #define bfd_mach_cpu32 8
9 kx #define bfd_mach_fido 9
9 kx #define bfd_mach_mcf_isa_a_nodiv 10
9 kx #define bfd_mach_mcf_isa_a 11
9 kx #define bfd_mach_mcf_isa_a_mac 12
9 kx #define bfd_mach_mcf_isa_a_emac 13
9 kx #define bfd_mach_mcf_isa_aplus 14
9 kx #define bfd_mach_mcf_isa_aplus_mac 15
9 kx #define bfd_mach_mcf_isa_aplus_emac 16
9 kx #define bfd_mach_mcf_isa_b_nousp 17
9 kx #define bfd_mach_mcf_isa_b_nousp_mac 18
9 kx #define bfd_mach_mcf_isa_b_nousp_emac 19
9 kx #define bfd_mach_mcf_isa_b 20
9 kx #define bfd_mach_mcf_isa_b_mac 21
9 kx #define bfd_mach_mcf_isa_b_emac 22
9 kx #define bfd_mach_mcf_isa_b_float 23
9 kx #define bfd_mach_mcf_isa_b_float_mac 24
9 kx #define bfd_mach_mcf_isa_b_float_emac 25
9 kx #define bfd_mach_mcf_isa_c 26
9 kx #define bfd_mach_mcf_isa_c_mac 27
9 kx #define bfd_mach_mcf_isa_c_emac 28
9 kx #define bfd_mach_mcf_isa_c_nodiv 29
9 kx #define bfd_mach_mcf_isa_c_nodiv_mac 30
9 kx #define bfd_mach_mcf_isa_c_nodiv_emac 31
9 kx bfd_arch_vax, /* DEC Vax. */
9 kx
9 kx bfd_arch_or1k, /* OpenRISC 1000. */
9 kx #define bfd_mach_or1k 1
9 kx #define bfd_mach_or1knd 2
9 kx
9 kx bfd_arch_sparc, /* SPARC. */
9 kx #define bfd_mach_sparc 1
9 kx /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
9 kx #define bfd_mach_sparc_sparclet 2
9 kx #define bfd_mach_sparc_sparclite 3
9 kx #define bfd_mach_sparc_v8plus 4
9 kx #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
9 kx #define bfd_mach_sparc_sparclite_le 6
9 kx #define bfd_mach_sparc_v9 7
9 kx #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
9 kx #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
9 kx #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
9 kx #define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
9 kx #define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
9 kx #define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
9 kx #define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
9 kx #define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
9 kx #define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
9 kx #define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
9 kx #define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
9 kx #define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
9 kx #define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
9 kx #define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
9 kx #define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
9 kx /* Nonzero if MACH has the v9 instruction set. */
9 kx #define bfd_mach_sparc_v9_p(mach) \
9 kx ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9m8 \
9 kx && (mach) != bfd_mach_sparc_sparclite_le)
9 kx /* Nonzero if MACH is a 64 bit sparc architecture. */
9 kx #define bfd_mach_sparc_64bit_p(mach) \
9 kx ((mach) >= bfd_mach_sparc_v9 \
9 kx && (mach) != bfd_mach_sparc_v8plusb \
9 kx && (mach) != bfd_mach_sparc_v8plusc \
9 kx && (mach) != bfd_mach_sparc_v8plusd \
9 kx && (mach) != bfd_mach_sparc_v8pluse \
9 kx && (mach) != bfd_mach_sparc_v8plusv \
9 kx && (mach) != bfd_mach_sparc_v8plusm \
9 kx && (mach) != bfd_mach_sparc_v8plusm8)
9 kx bfd_arch_spu, /* PowerPC SPU. */
9 kx #define bfd_mach_spu 256
9 kx bfd_arch_mips, /* MIPS Rxxxx. */
9 kx #define bfd_mach_mips3000 3000
9 kx #define bfd_mach_mips3900 3900
9 kx #define bfd_mach_mips4000 4000
9 kx #define bfd_mach_mips4010 4010
9 kx #define bfd_mach_mips4100 4100
9 kx #define bfd_mach_mips4111 4111
9 kx #define bfd_mach_mips4120 4120
9 kx #define bfd_mach_mips4300 4300
9 kx #define bfd_mach_mips4400 4400
9 kx #define bfd_mach_mips4600 4600
9 kx #define bfd_mach_mips4650 4650
9 kx #define bfd_mach_mips5000 5000
9 kx #define bfd_mach_mips5400 5400
9 kx #define bfd_mach_mips5500 5500
9 kx #define bfd_mach_mips5900 5900
9 kx #define bfd_mach_mips6000 6000
9 kx #define bfd_mach_mips7000 7000
9 kx #define bfd_mach_mips8000 8000
9 kx #define bfd_mach_mips9000 9000
9 kx #define bfd_mach_mips10000 10000
9 kx #define bfd_mach_mips12000 12000
9 kx #define bfd_mach_mips14000 14000
9 kx #define bfd_mach_mips16000 16000
9 kx #define bfd_mach_mips16 16
9 kx #define bfd_mach_mips5 5
9 kx #define bfd_mach_mips_loongson_2e 3001
9 kx #define bfd_mach_mips_loongson_2f 3002
9 kx #define bfd_mach_mips_gs464 3003
9 kx #define bfd_mach_mips_gs464e 3004
9 kx #define bfd_mach_mips_gs264e 3005
9 kx #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
9 kx #define bfd_mach_mips_octeon 6501
9 kx #define bfd_mach_mips_octeonp 6601
9 kx #define bfd_mach_mips_octeon2 6502
9 kx #define bfd_mach_mips_octeon3 6503
9 kx #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
9 kx #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
9 kx #define bfd_mach_mipsisa32 32
9 kx #define bfd_mach_mipsisa32r2 33
9 kx #define bfd_mach_mipsisa32r3 34
9 kx #define bfd_mach_mipsisa32r5 36
9 kx #define bfd_mach_mipsisa32r6 37
9 kx #define bfd_mach_mipsisa64 64
9 kx #define bfd_mach_mipsisa64r2 65
9 kx #define bfd_mach_mipsisa64r3 66
9 kx #define bfd_mach_mipsisa64r5 68
9 kx #define bfd_mach_mipsisa64r6 69
9 kx #define bfd_mach_mips_micromips 96
9 kx bfd_arch_i386, /* Intel 386. */
9 kx #define bfd_mach_i386_intel_syntax (1 << 0)
9 kx #define bfd_mach_i386_i8086 (1 << 1)
9 kx #define bfd_mach_i386_i386 (1 << 2)
9 kx #define bfd_mach_x86_64 (1 << 3)
9 kx #define bfd_mach_x64_32 (1 << 4)
9 kx #define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
9 kx #define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
9 kx #define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
9 kx bfd_arch_iamcu, /* Intel MCU. */
9 kx #define bfd_mach_iamcu (1 << 8)
9 kx #define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
9 kx #define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
9 kx bfd_arch_romp, /* IBM ROMP PC/RT. */
9 kx bfd_arch_convex, /* Convex. */
9 kx bfd_arch_m98k, /* Motorola 98xxx. */
9 kx bfd_arch_pyramid, /* Pyramid Technology. */
9 kx bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
9 kx #define bfd_mach_h8300 1
9 kx #define bfd_mach_h8300h 2
9 kx #define bfd_mach_h8300s 3
9 kx #define bfd_mach_h8300hn 4
9 kx #define bfd_mach_h8300sn 5
9 kx #define bfd_mach_h8300sx 6
9 kx #define bfd_mach_h8300sxn 7
9 kx bfd_arch_pdp11, /* DEC PDP-11. */
9 kx bfd_arch_powerpc, /* PowerPC. */
9 kx #define bfd_mach_ppc 32
9 kx #define bfd_mach_ppc64 64
9 kx #define bfd_mach_ppc_403 403
9 kx #define bfd_mach_ppc_403gc 4030
9 kx #define bfd_mach_ppc_405 405
9 kx #define bfd_mach_ppc_505 505
9 kx #define bfd_mach_ppc_601 601
9 kx #define bfd_mach_ppc_602 602
9 kx #define bfd_mach_ppc_603 603
9 kx #define bfd_mach_ppc_ec603e 6031
9 kx #define bfd_mach_ppc_604 604
9 kx #define bfd_mach_ppc_620 620
9 kx #define bfd_mach_ppc_630 630
9 kx #define bfd_mach_ppc_750 750
9 kx #define bfd_mach_ppc_860 860
9 kx #define bfd_mach_ppc_a35 35
9 kx #define bfd_mach_ppc_rs64ii 642
9 kx #define bfd_mach_ppc_rs64iii 643
9 kx #define bfd_mach_ppc_7400 7400
9 kx #define bfd_mach_ppc_e500 500
9 kx #define bfd_mach_ppc_e500mc 5001
9 kx #define bfd_mach_ppc_e500mc64 5005
9 kx #define bfd_mach_ppc_e5500 5006
9 kx #define bfd_mach_ppc_e6500 5007
9 kx #define bfd_mach_ppc_titan 83
9 kx #define bfd_mach_ppc_vle 84
9 kx bfd_arch_rs6000, /* IBM RS/6000. */
9 kx #define bfd_mach_rs6k 6000
9 kx #define bfd_mach_rs6k_rs1 6001
9 kx #define bfd_mach_rs6k_rsc 6003
9 kx #define bfd_mach_rs6k_rs2 6002
9 kx bfd_arch_hppa, /* HP PA RISC. */
9 kx #define bfd_mach_hppa10 10
9 kx #define bfd_mach_hppa11 11
9 kx #define bfd_mach_hppa20 20
9 kx #define bfd_mach_hppa20w 25
9 kx bfd_arch_d10v, /* Mitsubishi D10V. */
9 kx #define bfd_mach_d10v 1
9 kx #define bfd_mach_d10v_ts2 2
9 kx #define bfd_mach_d10v_ts3 3
9 kx bfd_arch_d30v, /* Mitsubishi D30V. */
9 kx bfd_arch_dlx, /* DLX. */
9 kx bfd_arch_m68hc11, /* Motorola 68HC11. */
9 kx bfd_arch_m68hc12, /* Motorola 68HC12. */
9 kx #define bfd_mach_m6812_default 0
9 kx #define bfd_mach_m6812 1
9 kx #define bfd_mach_m6812s 2
9 kx bfd_arch_m9s12x, /* Freescale S12X. */
9 kx bfd_arch_m9s12xg, /* Freescale XGATE. */
9 kx bfd_arch_s12z, /* Freescale S12Z. */
9 kx #define bfd_mach_s12z_default 0
9 kx bfd_arch_z8k, /* Zilog Z8000. */
9 kx #define bfd_mach_z8001 1
9 kx #define bfd_mach_z8002 2
9 kx bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
9 kx #define bfd_mach_sh 1
9 kx #define bfd_mach_sh2 0x20
9 kx #define bfd_mach_sh_dsp 0x2d
9 kx #define bfd_mach_sh2a 0x2a
9 kx #define bfd_mach_sh2a_nofpu 0x2b
9 kx #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
9 kx #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
9 kx #define bfd_mach_sh2a_or_sh4 0x2a3
9 kx #define bfd_mach_sh2a_or_sh3e 0x2a4
9 kx #define bfd_mach_sh2e 0x2e
9 kx #define bfd_mach_sh3 0x30
9 kx #define bfd_mach_sh3_nommu 0x31
9 kx #define bfd_mach_sh3_dsp 0x3d
9 kx #define bfd_mach_sh3e 0x3e
9 kx #define bfd_mach_sh4 0x40
9 kx #define bfd_mach_sh4_nofpu 0x41
9 kx #define bfd_mach_sh4_nommu_nofpu 0x42
9 kx #define bfd_mach_sh4a 0x4a
9 kx #define bfd_mach_sh4a_nofpu 0x4b
9 kx #define bfd_mach_sh4al_dsp 0x4d
9 kx bfd_arch_alpha, /* Dec Alpha. */
9 kx #define bfd_mach_alpha_ev4 0x10
9 kx #define bfd_mach_alpha_ev5 0x20
9 kx #define bfd_mach_alpha_ev6 0x30
9 kx bfd_arch_arm, /* Advanced Risc Machines ARM. */
9 kx #define bfd_mach_arm_unknown 0
9 kx #define bfd_mach_arm_2 1
9 kx #define bfd_mach_arm_2a 2
9 kx #define bfd_mach_arm_3 3
9 kx #define bfd_mach_arm_3M 4
9 kx #define bfd_mach_arm_4 5
9 kx #define bfd_mach_arm_4T 6
9 kx #define bfd_mach_arm_5 7
9 kx #define bfd_mach_arm_5T 8
9 kx #define bfd_mach_arm_5TE 9
9 kx #define bfd_mach_arm_XScale 10
9 kx #define bfd_mach_arm_ep9312 11
9 kx #define bfd_mach_arm_iWMMXt 12
9 kx #define bfd_mach_arm_iWMMXt2 13
9 kx #define bfd_mach_arm_5TEJ 14
9 kx #define bfd_mach_arm_6 15
9 kx #define bfd_mach_arm_6KZ 16
9 kx #define bfd_mach_arm_6T2 17
9 kx #define bfd_mach_arm_6K 18
9 kx #define bfd_mach_arm_7 19
9 kx #define bfd_mach_arm_6M 20
9 kx #define bfd_mach_arm_6SM 21
9 kx #define bfd_mach_arm_7EM 22
9 kx #define bfd_mach_arm_8 23
9 kx #define bfd_mach_arm_8R 24
9 kx #define bfd_mach_arm_8M_BASE 25
9 kx #define bfd_mach_arm_8M_MAIN 26
9 kx #define bfd_mach_arm_8_1M_MAIN 27
9 kx #define bfd_mach_arm_9 28
9 kx bfd_arch_nds32, /* Andes NDS32. */
9 kx #define bfd_mach_n1 1
9 kx #define bfd_mach_n1h 2
9 kx #define bfd_mach_n1h_v2 3
9 kx #define bfd_mach_n1h_v3 4
9 kx #define bfd_mach_n1h_v3m 5
9 kx bfd_arch_ns32k, /* National Semiconductors ns32000. */
9 kx bfd_arch_tic30, /* Texas Instruments TMS320C30. */
9 kx bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
9 kx #define bfd_mach_tic3x 30
9 kx #define bfd_mach_tic4x 40
9 kx bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
9 kx bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
9 kx bfd_arch_v850, /* NEC V850. */
9 kx bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
9 kx #define bfd_mach_v850 1
9 kx #define bfd_mach_v850e 'E'
9 kx #define bfd_mach_v850e1 '1'
9 kx #define bfd_mach_v850e2 0x4532
9 kx #define bfd_mach_v850e2v3 0x45325633
9 kx #define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
9 kx bfd_arch_arc, /* ARC Cores. */
9 kx #define bfd_mach_arc_a4 0
9 kx #define bfd_mach_arc_a5 1
9 kx #define bfd_mach_arc_arc600 2
9 kx #define bfd_mach_arc_arc601 4
9 kx #define bfd_mach_arc_arc700 3
9 kx #define bfd_mach_arc_arcv2 5
9 kx bfd_arch_m32c, /* Renesas M16C/M32C. */
9 kx #define bfd_mach_m16c 0x75
9 kx #define bfd_mach_m32c 0x78
9 kx bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
9 kx #define bfd_mach_m32r 1 /* For backwards compatibility. */
9 kx #define bfd_mach_m32rx 'x'
9 kx #define bfd_mach_m32r2 '2'
9 kx bfd_arch_mn10200, /* Matsushita MN10200. */
9 kx bfd_arch_mn10300, /* Matsushita MN10300. */
9 kx #define bfd_mach_mn10300 300
9 kx #define bfd_mach_am33 330
9 kx #define bfd_mach_am33_2 332
9 kx bfd_arch_fr30,
9 kx #define bfd_mach_fr30 0x46523330
9 kx bfd_arch_frv,
9 kx #define bfd_mach_frv 1
9 kx #define bfd_mach_frvsimple 2
9 kx #define bfd_mach_fr300 300
9 kx #define bfd_mach_fr400 400
9 kx #define bfd_mach_fr450 450
9 kx #define bfd_mach_frvtomcat 499 /* fr500 prototype. */
9 kx #define bfd_mach_fr500 500
9 kx #define bfd_mach_fr550 550
9 kx bfd_arch_moxie, /* The moxie processor. */
9 kx #define bfd_mach_moxie 1
9 kx bfd_arch_ft32, /* The ft32 processor. */
9 kx #define bfd_mach_ft32 1
9 kx #define bfd_mach_ft32b 2
9 kx bfd_arch_mcore,
9 kx bfd_arch_mep,
9 kx #define bfd_mach_mep 1
9 kx #define bfd_mach_mep_h1 0x6831
9 kx #define bfd_mach_mep_c5 0x6335
9 kx bfd_arch_metag,
9 kx #define bfd_mach_metag 1
9 kx bfd_arch_ia64, /* HP/Intel ia64. */
9 kx #define bfd_mach_ia64_elf64 64
9 kx #define bfd_mach_ia64_elf32 32
9 kx bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
9 kx #define bfd_mach_ip2022 1
9 kx #define bfd_mach_ip2022ext 2
9 kx bfd_arch_iq2000, /* Vitesse IQ2000. */
9 kx #define bfd_mach_iq2000 1
9 kx #define bfd_mach_iq10 2
9 kx bfd_arch_bpf, /* Linux eBPF. */
9 kx #define bfd_mach_bpf 1
9 kx #define bfd_mach_xbpf 2
9 kx bfd_arch_epiphany, /* Adapteva EPIPHANY. */
9 kx #define bfd_mach_epiphany16 1
9 kx #define bfd_mach_epiphany32 2
9 kx bfd_arch_mt,
9 kx #define bfd_mach_ms1 1
9 kx #define bfd_mach_mrisc2 2
9 kx #define bfd_mach_ms2 3
9 kx bfd_arch_pj,
9 kx bfd_arch_avr, /* Atmel AVR microcontrollers. */
9 kx #define bfd_mach_avr1 1
9 kx #define bfd_mach_avr2 2
9 kx #define bfd_mach_avr25 25
9 kx #define bfd_mach_avr3 3
9 kx #define bfd_mach_avr31 31
9 kx #define bfd_mach_avr35 35
9 kx #define bfd_mach_avr4 4
9 kx #define bfd_mach_avr5 5
9 kx #define bfd_mach_avr51 51
9 kx #define bfd_mach_avr6 6
9 kx #define bfd_mach_avrtiny 100
9 kx #define bfd_mach_avrxmega1 101
9 kx #define bfd_mach_avrxmega2 102
9 kx #define bfd_mach_avrxmega3 103
9 kx #define bfd_mach_avrxmega4 104
9 kx #define bfd_mach_avrxmega5 105
9 kx #define bfd_mach_avrxmega6 106
9 kx #define bfd_mach_avrxmega7 107
9 kx bfd_arch_bfin, /* ADI Blackfin. */
9 kx #define bfd_mach_bfin 1
9 kx bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
9 kx #define bfd_mach_cr16 1
9 kx bfd_arch_crx, /* National Semiconductor CRX. */
9 kx #define bfd_mach_crx 1
9 kx bfd_arch_cris, /* Axis CRIS. */
9 kx #define bfd_mach_cris_v0_v10 255
9 kx #define bfd_mach_cris_v32 32
9 kx #define bfd_mach_cris_v10_v32 1032
9 kx bfd_arch_riscv,
9 kx #define bfd_mach_riscv32 132
9 kx #define bfd_mach_riscv64 164
9 kx bfd_arch_rl78,
9 kx #define bfd_mach_rl78 0x75
9 kx bfd_arch_rx, /* Renesas RX. */
9 kx #define bfd_mach_rx 0x75
9 kx #define bfd_mach_rx_v2 0x76
9 kx #define bfd_mach_rx_v3 0x77
9 kx bfd_arch_s390, /* IBM s390. */
9 kx #define bfd_mach_s390_31 31
9 kx #define bfd_mach_s390_64 64
9 kx bfd_arch_score, /* Sunplus score. */
9 kx #define bfd_mach_score3 3
9 kx #define bfd_mach_score7 7
9 kx bfd_arch_mmix, /* Donald Knuth's educational processor. */
9 kx bfd_arch_xstormy16,
9 kx #define bfd_mach_xstormy16 1
9 kx bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
9 kx #define bfd_mach_msp11 11
9 kx #define bfd_mach_msp110 110
9 kx #define bfd_mach_msp12 12
9 kx #define bfd_mach_msp13 13
9 kx #define bfd_mach_msp14 14
9 kx #define bfd_mach_msp15 15
9 kx #define bfd_mach_msp16 16
9 kx #define bfd_mach_msp20 20
9 kx #define bfd_mach_msp21 21
9 kx #define bfd_mach_msp22 22
9 kx #define bfd_mach_msp23 23
9 kx #define bfd_mach_msp24 24
9 kx #define bfd_mach_msp26 26
9 kx #define bfd_mach_msp31 31
9 kx #define bfd_mach_msp32 32
9 kx #define bfd_mach_msp33 33
9 kx #define bfd_mach_msp41 41
9 kx #define bfd_mach_msp42 42
9 kx #define bfd_mach_msp43 43
9 kx #define bfd_mach_msp44 44
9 kx #define bfd_mach_msp430x 45
9 kx #define bfd_mach_msp46 46
9 kx #define bfd_mach_msp47 47
9 kx #define bfd_mach_msp54 54
9 kx bfd_arch_xgate, /* Freescale XGATE. */
9 kx #define bfd_mach_xgate 1
9 kx bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
9 kx #define bfd_mach_xtensa 1
9 kx bfd_arch_z80,
9 kx /* Zilog Z80 without undocumented opcodes. */
9 kx #define bfd_mach_z80strict 1
9 kx /* Zilog Z180: successor with additional instructions, but without
9 kx halves of ix and iy. */
9 kx #define bfd_mach_z180 2
9 kx /* Zilog Z80 with ixl, ixh, iyl, and iyh. */
9 kx #define bfd_mach_z80 3
9 kx /* Zilog eZ80 (successor of Z80 & Z180) in Z80 (16-bit address) mode. */
9 kx #define bfd_mach_ez80_z80 4
9 kx /* Zilog eZ80 (successor of Z80 & Z180) in ADL (24-bit address) mode. */
9 kx #define bfd_mach_ez80_adl 5
9 kx /* Z80N */
9 kx #define bfd_mach_z80n 6
9 kx /* Zilog Z80 with all undocumented instructions. */
9 kx #define bfd_mach_z80full 7
9 kx /* GameBoy Z80 (reduced instruction set). */
9 kx #define bfd_mach_gbz80 8
9 kx /* ASCII R800: successor with multiplication. */
9 kx #define bfd_mach_r800 11
9 kx bfd_arch_lm32, /* Lattice Mico32. */
9 kx #define bfd_mach_lm32 1
9 kx bfd_arch_microblaze,/* Xilinx MicroBlaze. */
9 kx bfd_arch_tilepro, /* Tilera TILEPro. */
9 kx bfd_arch_tilegx, /* Tilera TILE-Gx. */
9 kx #define bfd_mach_tilepro 1
9 kx #define bfd_mach_tilegx 1
9 kx #define bfd_mach_tilegx32 2
9 kx bfd_arch_aarch64, /* AArch64. */
9 kx #define bfd_mach_aarch64 0
9 kx #define bfd_mach_aarch64_8R 1
9 kx #define bfd_mach_aarch64_ilp32 32
9 kx #define bfd_mach_aarch64_llp64 64
9 kx bfd_arch_nios2, /* Nios II. */
9 kx #define bfd_mach_nios2 0
9 kx #define bfd_mach_nios2r1 1
9 kx #define bfd_mach_nios2r2 2
9 kx bfd_arch_visium, /* Visium. */
9 kx #define bfd_mach_visium 1
9 kx bfd_arch_wasm32, /* WebAssembly. */
9 kx #define bfd_mach_wasm32 1
9 kx bfd_arch_pru, /* PRU. */
9 kx #define bfd_mach_pru 0
9 kx bfd_arch_nfp, /* Netronome Flow Processor */
9 kx #define bfd_mach_nfp3200 0x3200
9 kx #define bfd_mach_nfp6000 0x6000
9 kx bfd_arch_csky, /* C-SKY. */
9 kx #define bfd_mach_ck_unknown 0
9 kx #define bfd_mach_ck510 1
9 kx #define bfd_mach_ck610 2
9 kx #define bfd_mach_ck801 3
9 kx #define bfd_mach_ck802 4
9 kx #define bfd_mach_ck803 5
9 kx #define bfd_mach_ck807 6
9 kx #define bfd_mach_ck810 7
9 kx #define bfd_mach_ck860 8
9 kx bfd_arch_loongarch, /* LoongArch */
9 kx #define bfd_mach_loongarch32 1
9 kx #define bfd_mach_loongarch64 2
9 kx bfd_arch_amdgcn, /* AMDGCN */
9 kx #define bfd_mach_amdgcn_unknown 0x000
9 kx #define bfd_mach_amdgcn_gfx900 0x02c
9 kx #define bfd_mach_amdgcn_gfx904 0x02e
9 kx #define bfd_mach_amdgcn_gfx906 0x02f
9 kx #define bfd_mach_amdgcn_gfx908 0x030
9 kx #define bfd_mach_amdgcn_gfx90a 0x03f
9 kx #define bfd_mach_amdgcn_gfx1010 0x033
9 kx #define bfd_mach_amdgcn_gfx1011 0x034
9 kx #define bfd_mach_amdgcn_gfx1012 0x035
9 kx #define bfd_mach_amdgcn_gfx1030 0x036
9 kx #define bfd_mach_amdgcn_gfx1031 0x037
9 kx #define bfd_mach_amdgcn_gfx1032 0x038
9 kx bfd_arch_last
9 kx };
9 kx
9 kx typedef struct bfd_arch_info
9 kx {
9 kx int bits_per_word;
9 kx int bits_per_address;
9 kx int bits_per_byte;
9 kx enum bfd_architecture arch;
9 kx unsigned long mach;
9 kx const char *arch_name;
9 kx const char *printable_name;
9 kx unsigned int section_align_power;
9 kx /* TRUE if this is the default machine for the architecture.
9 kx The default arch should be the first entry for an arch so that
9 kx all the entries for that arch can be accessed via <<next>>. */
9 kx bool the_default;
9 kx const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
9 kx const struct bfd_arch_info *);
9 kx
9 kx bool (*scan) (const struct bfd_arch_info *, const char *);
9 kx
9 kx /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
9 kx IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
9 kx TRUE, the buffer contains code. */
9 kx void *(*fill) (bfd_size_type count, bool is_bigendian, bool code);
9 kx
9 kx const struct bfd_arch_info *next;
9 kx
9 kx /* On some architectures the offset for a relocation can point into
9 kx the middle of an instruction. This field specifies the maximum
9 kx offset such a relocation can have (in octets). This affects the
9 kx behaviour of the disassembler, since a value greater than zero
9 kx means that it may need to disassemble an instruction twice, once
9 kx to get its length and then a second time to display it. If the
9 kx value is negative then this has to be done for every single
9 kx instruction, regardless of the offset of the reloc. */
9 kx signed int max_reloc_offset_into_insn;
9 kx }
9 kx bfd_arch_info_type;
9 kx
9 kx const char *bfd_printable_name (bfd *abfd);
9 kx
9 kx const bfd_arch_info_type *bfd_scan_arch (const char *string);
9 kx
9 kx const char **bfd_arch_list (void);
9 kx
9 kx const bfd_arch_info_type *bfd_arch_get_compatible
9 kx (const bfd *abfd, const bfd *bbfd, bool accept_unknowns);
9 kx
9 kx void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
9 kx
9 kx bool bfd_default_set_arch_mach
9 kx (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
9 kx
9 kx enum bfd_architecture bfd_get_arch (const bfd *abfd);
9 kx
9 kx unsigned long bfd_get_mach (const bfd *abfd);
9 kx
9 kx unsigned int bfd_arch_bits_per_byte (const bfd *abfd);
9 kx
9 kx unsigned int bfd_arch_bits_per_address (const bfd *abfd);
9 kx
9 kx const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
9 kx
9 kx const bfd_arch_info_type *bfd_lookup_arch
9 kx (enum bfd_architecture arch, unsigned long machine);
9 kx
9 kx const char *bfd_printable_arch_mach
9 kx (enum bfd_architecture arch, unsigned long machine);
9 kx
9 kx unsigned int bfd_octets_per_byte (const bfd *abfd,
9 kx const asection *sec);
9 kx
9 kx unsigned int bfd_arch_mach_octets_per_byte
9 kx (enum bfd_architecture arch, unsigned long machine);
9 kx
9 kx /* Extracted from reloc.c. */
9 kx
9 kx typedef enum bfd_reloc_status
9 kx {
9 kx /* No errors detected. Note - the value 2 is used so that it
9 kx will not be mistaken for the boolean TRUE or FALSE values. */
9 kx bfd_reloc_ok = 2,
9 kx
9 kx /* The relocation was performed, but there was an overflow. */
9 kx bfd_reloc_overflow,
9 kx
9 kx /* The address to relocate was not within the section supplied. */
9 kx bfd_reloc_outofrange,
9 kx
9 kx /* Used by special functions. */
9 kx bfd_reloc_continue,
9 kx
9 kx /* Unsupported relocation size requested. */
9 kx bfd_reloc_notsupported,
9 kx
9 kx /* Target specific meaning. */
9 kx bfd_reloc_other,
9 kx
9 kx /* The symbol to relocate against was undefined. */
9 kx bfd_reloc_undefined,
9 kx
9 kx /* The relocation was performed, but may not be ok. If this type is
9 kx returned, the error_message argument to bfd_perform_relocation
9 kx will be set. */
9 kx bfd_reloc_dangerous
9 kx }
9 kx bfd_reloc_status_type;
9 kx
9 kx typedef const struct reloc_howto_struct reloc_howto_type;
9 kx
9 kx typedef struct reloc_cache_entry
9 kx {
9 kx /* A pointer into the canonical table of pointers. */
9 kx struct bfd_symbol **sym_ptr_ptr;
9 kx
9 kx /* offset in section. */
9 kx bfd_size_type address;
9 kx
9 kx /* addend for relocation value. */
9 kx bfd_vma addend;
9 kx
9 kx /* Pointer to how to perform the required relocation. */
9 kx reloc_howto_type *howto;
9 kx
9 kx }
9 kx arelent;
9 kx
9 kx
9 kx enum complain_overflow
9 kx {
9 kx /* Do not complain on overflow. */
9 kx complain_overflow_dont,
9 kx
9 kx /* Complain if the value overflows when considered as a signed
9 kx number one bit larger than the field. ie. A bitfield of N bits
9 kx is allowed to represent -2**n to 2**n-1. */
9 kx complain_overflow_bitfield,
9 kx
9 kx /* Complain if the value overflows when considered as a signed
9 kx number. */
9 kx complain_overflow_signed,
9 kx
9 kx /* Complain if the value overflows when considered as an
9 kx unsigned number. */
9 kx complain_overflow_unsigned
9 kx };
9 kx struct reloc_howto_struct
9 kx {
9 kx /* The type field has mainly a documentary use - the back end can
9 kx do what it wants with it, though normally the back end's idea of
9 kx an external reloc number is stored in this field. */
9 kx unsigned int type;
9 kx
9 kx /* The size of the item to be relocated in bytes. */
9 kx unsigned int size:4;
9 kx
9 kx /* The number of bits in the field to be relocated. This is used
9 kx when doing overflow checking. */
9 kx unsigned int bitsize:7;
9 kx
9 kx /* The value the final relocation is shifted right by. This drops
9 kx unwanted data from the relocation. */
9 kx unsigned int rightshift:6;
9 kx
9 kx /* The bit position of the reloc value in the destination.
9 kx The relocated value is left shifted by this amount. */
9 kx unsigned int bitpos:6;
9 kx
9 kx /* What type of overflow error should be checked for when
9 kx relocating. */
9 kx ENUM_BITFIELD (complain_overflow) complain_on_overflow:2;
9 kx
9 kx /* The relocation value should be negated before applying. */
9 kx unsigned int negate:1;
9 kx
9 kx /* The relocation is relative to the item being relocated. */
9 kx unsigned int pc_relative:1;
9 kx
9 kx /* Some formats record a relocation addend in the section contents
9 kx rather than with the relocation. For ELF formats this is the
9 kx distinction between USE_REL and USE_RELA (though the code checks
9 kx for USE_REL == 1/0). The value of this field is TRUE if the
9 kx addend is recorded with the section contents; when performing a
9 kx partial link (ld -r) the section contents (the data) will be
9 kx modified. The value of this field is FALSE if addends are
9 kx recorded with the relocation (in arelent.addend); when performing
9 kx a partial link the relocation will be modified.
9 kx All relocations for all ELF USE_RELA targets should set this field
9 kx to FALSE (values of TRUE should be looked on with suspicion).
9 kx However, the converse is not true: not all relocations of all ELF
9 kx USE_REL targets set this field to TRUE. Why this is so is peculiar
9 kx to each particular target. For relocs that aren't used in partial
9 kx links (e.g. GOT stuff) it doesn't matter what this is set to. */
9 kx unsigned int partial_inplace:1;
9 kx
9 kx /* When some formats create PC relative instructions, they leave
9 kx the value of the pc of the place being relocated in the offset
9 kx slot of the instruction, so that a PC relative relocation can
9 kx be made just by adding in an ordinary offset (e.g., sun3 a.out).
9 kx Some formats leave the displacement part of an instruction
9 kx empty (e.g., ELF); this flag signals the fact. */
9 kx unsigned int pcrel_offset:1;
9 kx
9 kx /* src_mask selects the part of the instruction (or data) to be used
9 kx in the relocation sum. If the target relocations don't have an
9 kx addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
9 kx dst_mask to extract the addend from the section contents. If
9 kx relocations do have an addend in the reloc, eg. ELF USE_RELA, this
9 kx field should normally be zero. Non-zero values for ELF USE_RELA
9 kx targets should be viewed with suspicion as normally the value in
9 kx the dst_mask part of the section contents should be ignored. */
9 kx bfd_vma src_mask;
9 kx
9 kx /* dst_mask selects which parts of the instruction (or data) are
9 kx replaced with a relocated value. */
9 kx bfd_vma dst_mask;
9 kx
9 kx /* If this field is non null, then the supplied function is
9 kx called rather than the normal function. This allows really
9 kx strange relocation methods to be accommodated. */
9 kx bfd_reloc_status_type (*special_function)
9 kx (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
9 kx bfd *, char **);
9 kx
9 kx /* The textual name of the relocation type. */
9 kx const char *name;
9 kx };
9 kx
9 kx #define HOWTO_RSIZE(sz) ((sz) < 0 ? -(sz) : (sz))
9 kx #define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \
9 kx inplace, src_mask, dst_mask, pcrel_off) \
9 kx { (unsigned) type, HOWTO_RSIZE (size), bits, right, left, ovf, \
9 kx size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
9 kx #define EMPTY_HOWTO(C) \
9 kx HOWTO ((C), 0, 1, 0, false, 0, complain_overflow_dont, NULL, \
9 kx NULL, false, 0, 0, false)
9 kx
9 kx static inline unsigned int
9 kx bfd_get_reloc_size (reloc_howto_type *howto)
9 kx {
9 kx return howto->size;
9 kx }
9 kx
9 kx typedef struct relent_chain
9 kx {
9 kx arelent relent;
9 kx struct relent_chain *next;
9 kx }
9 kx arelent_chain;
9 kx
9 kx bfd_reloc_status_type bfd_check_overflow
9 kx (enum complain_overflow how,
9 kx unsigned int bitsize,
9 kx unsigned int rightshift,
9 kx unsigned int addrsize,
9 kx bfd_vma relocation);
9 kx
9 kx bool bfd_reloc_offset_in_range
9 kx (reloc_howto_type *howto,
9 kx bfd *abfd,
9 kx asection *section,
9 kx bfd_size_type offset);
9 kx
9 kx bfd_reloc_status_type bfd_perform_relocation
9 kx (bfd *abfd,
9 kx arelent *reloc_entry,
9 kx void *data,
9 kx asection *input_section,
9 kx bfd *output_bfd,
9 kx char **error_message);
9 kx
9 kx bfd_reloc_status_type bfd_install_relocation
9 kx (bfd *abfd,
9 kx arelent *reloc_entry,
9 kx void *data, bfd_vma data_start,
9 kx asection *input_section,
9 kx char **error_message);
9 kx
9 kx enum bfd_reloc_code_real {
9 kx _dummy_first_bfd_reloc_code_real,
9 kx
9 kx
9 kx /* Basic absolute relocations of N bits. */
9 kx BFD_RELOC_64,
9 kx BFD_RELOC_32,
9 kx BFD_RELOC_26,
9 kx BFD_RELOC_24,
9 kx BFD_RELOC_16,
9 kx BFD_RELOC_14,
9 kx BFD_RELOC_8,
9 kx
9 kx /* PC-relative relocations. Sometimes these are relative to the address
9 kx of the relocation itself; sometimes they are relative to the start of
9 kx the section containing the relocation. It depends on the specific target. */
9 kx BFD_RELOC_64_PCREL,
9 kx BFD_RELOC_32_PCREL,
9 kx BFD_RELOC_24_PCREL,
9 kx BFD_RELOC_16_PCREL,
9 kx BFD_RELOC_12_PCREL,
9 kx BFD_RELOC_8_PCREL,
9 kx
9 kx /* Section relative relocations. Some targets need this for DWARF2. */
9 kx BFD_RELOC_32_SECREL,
9 kx BFD_RELOC_16_SECIDX,
9 kx
9 kx /* For ELF. */
9 kx BFD_RELOC_32_GOT_PCREL,
9 kx BFD_RELOC_16_GOT_PCREL,
9 kx BFD_RELOC_8_GOT_PCREL,
9 kx BFD_RELOC_32_GOTOFF,
9 kx BFD_RELOC_16_GOTOFF,
9 kx BFD_RELOC_LO16_GOTOFF,
9 kx BFD_RELOC_HI16_GOTOFF,
9 kx BFD_RELOC_HI16_S_GOTOFF,
9 kx BFD_RELOC_8_GOTOFF,
9 kx BFD_RELOC_64_PLT_PCREL,
9 kx BFD_RELOC_32_PLT_PCREL,
9 kx BFD_RELOC_24_PLT_PCREL,
9 kx BFD_RELOC_16_PLT_PCREL,
9 kx BFD_RELOC_8_PLT_PCREL,
9 kx BFD_RELOC_64_PLTOFF,
9 kx BFD_RELOC_32_PLTOFF,
9 kx BFD_RELOC_16_PLTOFF,
9 kx BFD_RELOC_LO16_PLTOFF,
9 kx BFD_RELOC_HI16_PLTOFF,
9 kx BFD_RELOC_HI16_S_PLTOFF,
9 kx BFD_RELOC_8_PLTOFF,
9 kx
9 kx /* Size relocations. */
9 kx BFD_RELOC_SIZE32,
9 kx BFD_RELOC_SIZE64,
9 kx
9 kx /* Relocations used by 68K ELF. */
9 kx BFD_RELOC_68K_GLOB_DAT,
9 kx BFD_RELOC_68K_JMP_SLOT,
9 kx BFD_RELOC_68K_RELATIVE,
9 kx BFD_RELOC_68K_TLS_GD32,
9 kx BFD_RELOC_68K_TLS_GD16,
9 kx BFD_RELOC_68K_TLS_GD8,
9 kx BFD_RELOC_68K_TLS_LDM32,
9 kx BFD_RELOC_68K_TLS_LDM16,
9 kx BFD_RELOC_68K_TLS_LDM8,
9 kx BFD_RELOC_68K_TLS_LDO32,
9 kx BFD_RELOC_68K_TLS_LDO16,
9 kx BFD_RELOC_68K_TLS_LDO8,
9 kx BFD_RELOC_68K_TLS_IE32,
9 kx BFD_RELOC_68K_TLS_IE16,
9 kx BFD_RELOC_68K_TLS_IE8,
9 kx BFD_RELOC_68K_TLS_LE32,
9 kx BFD_RELOC_68K_TLS_LE16,
9 kx BFD_RELOC_68K_TLS_LE8,
9 kx
9 kx /* Linkage-table relative. */
9 kx BFD_RELOC_32_BASEREL,
9 kx BFD_RELOC_16_BASEREL,
9 kx BFD_RELOC_LO16_BASEREL,
9 kx BFD_RELOC_HI16_BASEREL,
9 kx BFD_RELOC_HI16_S_BASEREL,
9 kx BFD_RELOC_8_BASEREL,
9 kx BFD_RELOC_RVA,
9 kx
9 kx /* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
9 kx BFD_RELOC_8_FFnn,
9 kx
9 kx /* These PC-relative relocations are stored as word displacements --
9 kx i.e., byte displacements shifted right two bits. The 30-bit word
9 kx displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
9 kx SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
9 kx signed 16-bit displacement is used on the MIPS, and the 23-bit
9 kx displacement is used on the Alpha. */
9 kx BFD_RELOC_32_PCREL_S2,
9 kx BFD_RELOC_16_PCREL_S2,
9 kx BFD_RELOC_23_PCREL_S2,
9 kx
9 kx /* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
9 kx the target word. These are used on the SPARC. */
9 kx BFD_RELOC_HI22,
9 kx BFD_RELOC_LO10,
9 kx
9 kx /* For systems that allocate a Global Pointer register, these are
9 kx displacements off that register. These relocation types are
9 kx handled specially, because the value the register will have is
9 kx decided relatively late. */
9 kx BFD_RELOC_GPREL16,
9 kx BFD_RELOC_GPREL32,
9 kx
9 kx /* SPARC ELF relocations. There is probably some overlap with other
9 kx relocation types already defined. */
9 kx BFD_RELOC_NONE,
9 kx BFD_RELOC_SPARC_WDISP22,
9 kx BFD_RELOC_SPARC22,
9 kx BFD_RELOC_SPARC13,
9 kx BFD_RELOC_SPARC_GOT10,
9 kx BFD_RELOC_SPARC_GOT13,
9 kx BFD_RELOC_SPARC_GOT22,
9 kx BFD_RELOC_SPARC_PC10,
9 kx BFD_RELOC_SPARC_PC22,
9 kx BFD_RELOC_SPARC_WPLT30,
9 kx BFD_RELOC_SPARC_COPY,
9 kx BFD_RELOC_SPARC_GLOB_DAT,
9 kx BFD_RELOC_SPARC_JMP_SLOT,
9 kx BFD_RELOC_SPARC_RELATIVE,
9 kx BFD_RELOC_SPARC_UA16,
9 kx BFD_RELOC_SPARC_UA32,
9 kx BFD_RELOC_SPARC_UA64,
9 kx BFD_RELOC_SPARC_GOTDATA_HIX22,
9 kx BFD_RELOC_SPARC_GOTDATA_LOX10,
9 kx BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
9 kx BFD_RELOC_SPARC_GOTDATA_OP_LOX10,
9 kx BFD_RELOC_SPARC_GOTDATA_OP,
9 kx BFD_RELOC_SPARC_JMP_IREL,
9 kx BFD_RELOC_SPARC_IRELATIVE,
9 kx
9 kx /* I think these are specific to SPARC a.out (e.g., Sun 4). */
9 kx BFD_RELOC_SPARC_BASE13,
9 kx BFD_RELOC_SPARC_BASE22,
9 kx
9 kx /* SPARC64 relocations */
9 kx #define BFD_RELOC_SPARC_64 BFD_RELOC_64
9 kx BFD_RELOC_SPARC_10,
9 kx BFD_RELOC_SPARC_11,
9 kx BFD_RELOC_SPARC_OLO10,
9 kx BFD_RELOC_SPARC_HH22,
9 kx BFD_RELOC_SPARC_HM10,
9 kx BFD_RELOC_SPARC_LM22,
9 kx BFD_RELOC_SPARC_PC_HH22,
9 kx BFD_RELOC_SPARC_PC_HM10,
9 kx BFD_RELOC_SPARC_PC_LM22,
9 kx BFD_RELOC_SPARC_WDISP16,
9 kx BFD_RELOC_SPARC_WDISP19,
9 kx BFD_RELOC_SPARC_7,
9 kx BFD_RELOC_SPARC_6,
9 kx BFD_RELOC_SPARC_5,
9 kx #define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
9 kx BFD_RELOC_SPARC_PLT32,
9 kx BFD_RELOC_SPARC_PLT64,
9 kx BFD_RELOC_SPARC_HIX22,
9 kx BFD_RELOC_SPARC_LOX10,
9 kx BFD_RELOC_SPARC_H44,
9 kx BFD_RELOC_SPARC_M44,
9 kx BFD_RELOC_SPARC_L44,
9 kx BFD_RELOC_SPARC_REGISTER,
9 kx BFD_RELOC_SPARC_H34,
9 kx BFD_RELOC_SPARC_SIZE32,
9 kx BFD_RELOC_SPARC_SIZE64,
9 kx BFD_RELOC_SPARC_WDISP10,
9 kx
9 kx /* SPARC little endian relocation */
9 kx BFD_RELOC_SPARC_REV32,
9 kx
9 kx /* SPARC TLS relocations */
9 kx BFD_RELOC_SPARC_TLS_GD_HI22,
9 kx BFD_RELOC_SPARC_TLS_GD_LO10,
9 kx BFD_RELOC_SPARC_TLS_GD_ADD,
9 kx BFD_RELOC_SPARC_TLS_GD_CALL,
9 kx BFD_RELOC_SPARC_TLS_LDM_HI22,
9 kx BFD_RELOC_SPARC_TLS_LDM_LO10,
9 kx BFD_RELOC_SPARC_TLS_LDM_ADD,
9 kx BFD_RELOC_SPARC_TLS_LDM_CALL,
9 kx BFD_RELOC_SPARC_TLS_LDO_HIX22,
9 kx BFD_RELOC_SPARC_TLS_LDO_LOX10,
9 kx BFD_RELOC_SPARC_TLS_LDO_ADD,
9 kx BFD_RELOC_SPARC_TLS_IE_HI22,
9 kx BFD_RELOC_SPARC_TLS_IE_LO10,
9 kx BFD_RELOC_SPARC_TLS_IE_LD,
9 kx BFD_RELOC_SPARC_TLS_IE_LDX,
9 kx BFD_RELOC_SPARC_TLS_IE_ADD,
9 kx BFD_RELOC_SPARC_TLS_LE_HIX22,
9 kx BFD_RELOC_SPARC_TLS_LE_LOX10,
9 kx BFD_RELOC_SPARC_TLS_DTPMOD32,
9 kx BFD_RELOC_SPARC_TLS_DTPMOD64,
9 kx BFD_RELOC_SPARC_TLS_DTPOFF32,
9 kx BFD_RELOC_SPARC_TLS_DTPOFF64,
9 kx BFD_RELOC_SPARC_TLS_TPOFF32,
9 kx BFD_RELOC_SPARC_TLS_TPOFF64,
9 kx
9 kx /* SPU Relocations. */
9 kx BFD_RELOC_SPU_IMM7,
9 kx BFD_RELOC_SPU_IMM8,
9 kx BFD_RELOC_SPU_IMM10,
9 kx BFD_RELOC_SPU_IMM10W,
9 kx BFD_RELOC_SPU_IMM16,
9 kx BFD_RELOC_SPU_IMM16W,
9 kx BFD_RELOC_SPU_IMM18,
9 kx BFD_RELOC_SPU_PCREL9a,
9 kx BFD_RELOC_SPU_PCREL9b,
9 kx BFD_RELOC_SPU_PCREL16,
9 kx BFD_RELOC_SPU_LO16,
9 kx BFD_RELOC_SPU_HI16,
9 kx BFD_RELOC_SPU_PPU32,
9 kx BFD_RELOC_SPU_PPU64,
9 kx BFD_RELOC_SPU_ADD_PIC,
9 kx
9 kx /* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
9 kx "addend" in some special way.
9 kx For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
9 kx writing; when reading, it will be the absolute section symbol. The
9 kx addend is the displacement in bytes of the "lda" instruction from
9 kx the "ldah" instruction (which is at the address of this reloc). */
9 kx BFD_RELOC_ALPHA_GPDISP_HI16,
9 kx
9 kx /* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
9 kx with GPDISP_HI16 relocs. The addend is ignored when writing the
9 kx relocations out, and is filled in with the file's GP value on
9 kx reading, for convenience. */
9 kx BFD_RELOC_ALPHA_GPDISP_LO16,
9 kx
9 kx /* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
9 kx relocation except that there is no accompanying GPDISP_LO16
9 kx relocation. */
9 kx BFD_RELOC_ALPHA_GPDISP,
9 kx
9 kx /* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
9 kx the assembler turns it into a LDQ instruction to load the address of
9 kx the symbol, and then fills in a register in the real instruction.
9 kx
9 kx The LITERAL reloc, at the LDQ instruction, refers to the .lita
9 kx section symbol. The addend is ignored when writing, but is filled
9 kx in with the file's GP value on reading, for convenience, as with the
9 kx GPDISP_LO16 reloc.
9 kx
9 kx The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
9 kx It should refer to the symbol to be referenced, as with 16_GOTOFF,
9 kx but it generates output not based on the position within the .got
9 kx section, but relative to the GP value chosen for the file during the
9 kx final link stage.
9 kx
9 kx The LITUSE reloc, on the instruction using the loaded address, gives
9 kx information to the linker that it might be able to use to optimize
9 kx away some literal section references. The symbol is ignored (read
9 kx as the absolute section symbol), and the "addend" indicates the type
9 kx of instruction using the register:
9 kx 1 - "memory" fmt insn
9 kx 2 - byte-manipulation (byte offset reg)
9 kx 3 - jsr (target of branch) */
9 kx BFD_RELOC_ALPHA_LITERAL,
9 kx BFD_RELOC_ALPHA_ELF_LITERAL,
9 kx BFD_RELOC_ALPHA_LITUSE,
9 kx
9 kx /* The HINT relocation indicates a value that should be filled into the
9 kx "hint" field of a jmp/jsr/ret instruction, for possible branch-
9 kx prediction logic which may be provided on some processors. */
9 kx BFD_RELOC_ALPHA_HINT,
9 kx
9 kx /* The LINKAGE relocation outputs a linkage pair in the object file,
9 kx which is filled by the linker. */
9 kx BFD_RELOC_ALPHA_LINKAGE,
9 kx
9 kx /* The CODEADDR relocation outputs a STO_CA in the object file,
9 kx which is filled by the linker. */
9 kx BFD_RELOC_ALPHA_CODEADDR,
9 kx
9 kx /* The GPREL_HI/LO relocations together form a 32-bit offset from the
9 kx GP register. */
9 kx BFD_RELOC_ALPHA_GPREL_HI16,
9 kx BFD_RELOC_ALPHA_GPREL_LO16,
9 kx
9 kx /* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
9 kx share a common GP, and the target address is adjusted for
9 kx STO_ALPHA_STD_GPLOAD. */
9 kx BFD_RELOC_ALPHA_BRSGP,
9 kx
9 kx /* The NOP relocation outputs a NOP if the longword displacement
9 kx between two procedure entry points is < 2^21. */
9 kx BFD_RELOC_ALPHA_NOP,
9 kx
9 kx /* The BSR relocation outputs a BSR if the longword displacement
9 kx between two procedure entry points is < 2^21. */
9 kx BFD_RELOC_ALPHA_BSR,
9 kx
9 kx /* The LDA relocation outputs a LDA if the longword displacement
9 kx between two procedure entry points is < 2^16. */
9 kx BFD_RELOC_ALPHA_LDA,
9 kx
9 kx /* The BOH relocation outputs a BSR if the longword displacement
9 kx between two procedure entry points is < 2^21, or else a hint. */
9 kx BFD_RELOC_ALPHA_BOH,
9 kx
9 kx /* Alpha thread-local storage relocations. */
9 kx BFD_RELOC_ALPHA_TLSGD,
9 kx BFD_RELOC_ALPHA_TLSLDM,
9 kx BFD_RELOC_ALPHA_DTPMOD64,
9 kx BFD_RELOC_ALPHA_GOTDTPREL16,
9 kx BFD_RELOC_ALPHA_DTPREL64,
9 kx BFD_RELOC_ALPHA_DTPREL_HI16,
9 kx BFD_RELOC_ALPHA_DTPREL_LO16,
9 kx BFD_RELOC_ALPHA_DTPREL16,
9 kx BFD_RELOC_ALPHA_GOTTPREL16,
9 kx BFD_RELOC_ALPHA_TPREL64,
9 kx BFD_RELOC_ALPHA_TPREL_HI16,
9 kx BFD_RELOC_ALPHA_TPREL_LO16,
9 kx BFD_RELOC_ALPHA_TPREL16,
9 kx
9 kx /* The MIPS jump instruction. */
9 kx BFD_RELOC_MIPS_JMP,
9 kx BFD_RELOC_MICROMIPS_JMP,
9 kx
9 kx /* The MIPS16 jump instruction. */
9 kx BFD_RELOC_MIPS16_JMP,
9 kx
9 kx /* MIPS16 GP relative reloc. */
9 kx BFD_RELOC_MIPS16_GPREL,
9 kx
9 kx /* High 16 bits of 32-bit value; simple reloc. */
9 kx BFD_RELOC_HI16,
9 kx
9 kx /* High 16 bits of 32-bit value but the low 16 bits will be sign
9 kx extended and added to form the final result. If the low 16
9 kx bits form a negative number, we need to add one to the high value
9 kx to compensate for the borrow when the low bits are added. */
9 kx BFD_RELOC_HI16_S,
9 kx
9 kx /* Low 16 bits. */
9 kx BFD_RELOC_LO16,
9 kx
9 kx /* High 16 bits of 32-bit pc-relative value */
9 kx BFD_RELOC_HI16_PCREL,
9 kx
9 kx /* High 16 bits of 32-bit pc-relative value, adjusted */
9 kx BFD_RELOC_HI16_S_PCREL,
9 kx
9 kx /* Low 16 bits of pc-relative value */
9 kx BFD_RELOC_LO16_PCREL,
9 kx
9 kx /* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
9 kx 16-bit immediate fields */
9 kx BFD_RELOC_MIPS16_GOT16,
9 kx BFD_RELOC_MIPS16_CALL16,
9 kx
9 kx /* MIPS16 high 16 bits of 32-bit value. */
9 kx BFD_RELOC_MIPS16_HI16,
9 kx
9 kx /* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
9 kx extended and added to form the final result. If the low 16
9 kx bits form a negative number, we need to add one to the high value
9 kx to compensate for the borrow when the low bits are added. */
9 kx BFD_RELOC_MIPS16_HI16_S,
9 kx
9 kx /* MIPS16 low 16 bits. */
9 kx BFD_RELOC_MIPS16_LO16,
9 kx
9 kx /* MIPS16 TLS relocations */
9 kx BFD_RELOC_MIPS16_TLS_GD,
9 kx BFD_RELOC_MIPS16_TLS_LDM,
9 kx BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
9 kx BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
9 kx BFD_RELOC_MIPS16_TLS_GOTTPREL,
9 kx BFD_RELOC_MIPS16_TLS_TPREL_HI16,
9 kx BFD_RELOC_MIPS16_TLS_TPREL_LO16,
9 kx
9 kx /* Relocation against a MIPS literal section. */
9 kx BFD_RELOC_MIPS_LITERAL,
9 kx BFD_RELOC_MICROMIPS_LITERAL,
9 kx
9 kx /* microMIPS PC-relative relocations. */
9 kx BFD_RELOC_MICROMIPS_7_PCREL_S1,
9 kx BFD_RELOC_MICROMIPS_10_PCREL_S1,
9 kx BFD_RELOC_MICROMIPS_16_PCREL_S1,
9 kx
9 kx /* MIPS16 PC-relative relocation. */
9 kx BFD_RELOC_MIPS16_16_PCREL_S1,
9 kx
9 kx /* MIPS PC-relative relocations. */
9 kx BFD_RELOC_MIPS_21_PCREL_S2,
9 kx BFD_RELOC_MIPS_26_PCREL_S2,
9 kx BFD_RELOC_MIPS_18_PCREL_S3,
9 kx BFD_RELOC_MIPS_19_PCREL_S2,
9 kx
9 kx /* microMIPS versions of generic BFD relocs. */
9 kx BFD_RELOC_MICROMIPS_GPREL16,
9 kx BFD_RELOC_MICROMIPS_HI16,
9 kx BFD_RELOC_MICROMIPS_HI16_S,
9 kx BFD_RELOC_MICROMIPS_LO16,
9 kx
9 kx /* MIPS ELF relocations. */
9 kx BFD_RELOC_MIPS_GOT16,
9 kx BFD_RELOC_MICROMIPS_GOT16,
9 kx BFD_RELOC_MIPS_CALL16,
9 kx BFD_RELOC_MICROMIPS_CALL16,
9 kx BFD_RELOC_MIPS_GOT_HI16,
9 kx BFD_RELOC_MICROMIPS_GOT_HI16,
9 kx BFD_RELOC_MIPS_GOT_LO16,
9 kx BFD_RELOC_MICROMIPS_GOT_LO16,
9 kx BFD_RELOC_MIPS_CALL_HI16,
9 kx BFD_RELOC_MICROMIPS_CALL_HI16,
9 kx BFD_RELOC_MIPS_CALL_LO16,
9 kx BFD_RELOC_MICROMIPS_CALL_LO16,
9 kx BFD_RELOC_MIPS_SUB,
9 kx BFD_RELOC_MICROMIPS_SUB,
9 kx BFD_RELOC_MIPS_GOT_PAGE,
9 kx BFD_RELOC_MICROMIPS_GOT_PAGE,
9 kx BFD_RELOC_MIPS_GOT_OFST,
9 kx BFD_RELOC_MICROMIPS_GOT_OFST,
9 kx BFD_RELOC_MIPS_GOT_DISP,
9 kx BFD_RELOC_MICROMIPS_GOT_DISP,
9 kx BFD_RELOC_MIPS_SHIFT5,
9 kx BFD_RELOC_MIPS_SHIFT6,
9 kx BFD_RELOC_MIPS_INSERT_A,
9 kx BFD_RELOC_MIPS_INSERT_B,
9 kx BFD_RELOC_MIPS_DELETE,
9 kx BFD_RELOC_MIPS_HIGHEST,
9 kx BFD_RELOC_MICROMIPS_HIGHEST,
9 kx BFD_RELOC_MIPS_HIGHER,
9 kx BFD_RELOC_MICROMIPS_HIGHER,
9 kx BFD_RELOC_MIPS_SCN_DISP,
9 kx BFD_RELOC_MICROMIPS_SCN_DISP,
9 kx BFD_RELOC_MIPS_16,
9 kx BFD_RELOC_MIPS_RELGOT,
9 kx BFD_RELOC_MIPS_JALR,
9 kx BFD_RELOC_MICROMIPS_JALR,
9 kx BFD_RELOC_MIPS_TLS_DTPMOD32,
9 kx BFD_RELOC_MIPS_TLS_DTPREL32,
9 kx BFD_RELOC_MIPS_TLS_DTPMOD64,
9 kx BFD_RELOC_MIPS_TLS_DTPREL64,
9 kx BFD_RELOC_MIPS_TLS_GD,
9 kx BFD_RELOC_MICROMIPS_TLS_GD,
9 kx BFD_RELOC_MIPS_TLS_LDM,
9 kx BFD_RELOC_MICROMIPS_TLS_LDM,
9 kx BFD_RELOC_MIPS_TLS_DTPREL_HI16,
9 kx BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16,
9 kx BFD_RELOC_MIPS_TLS_DTPREL_LO16,
9 kx BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16,
9 kx BFD_RELOC_MIPS_TLS_GOTTPREL,
9 kx BFD_RELOC_MICROMIPS_TLS_GOTTPREL,
9 kx BFD_RELOC_MIPS_TLS_TPREL32,
9 kx BFD_RELOC_MIPS_TLS_TPREL64,
9 kx BFD_RELOC_MIPS_TLS_TPREL_HI16,
9 kx BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
9 kx BFD_RELOC_MIPS_TLS_TPREL_LO16,
9 kx BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
9 kx BFD_RELOC_MIPS_EH,
9 kx
9 kx
9 kx /* MIPS ELF relocations (VxWorks and PLT extensions). */
9 kx BFD_RELOC_MIPS_COPY,
9 kx BFD_RELOC_MIPS_JUMP_SLOT,
9 kx
9 kx
9 kx /* Moxie ELF relocations. */
9 kx BFD_RELOC_MOXIE_10_PCREL,
9 kx
9 kx
9 kx /* FT32 ELF relocations. */
9 kx BFD_RELOC_FT32_10,
9 kx BFD_RELOC_FT32_20,
9 kx BFD_RELOC_FT32_17,
9 kx BFD_RELOC_FT32_18,
9 kx BFD_RELOC_FT32_RELAX,
9 kx BFD_RELOC_FT32_SC0,
9 kx BFD_RELOC_FT32_SC1,
9 kx BFD_RELOC_FT32_15,
9 kx BFD_RELOC_FT32_DIFF32,
9 kx
9 kx
9 kx /* Fujitsu Frv Relocations. */
9 kx BFD_RELOC_FRV_LABEL16,
9 kx BFD_RELOC_FRV_LABEL24,
9 kx BFD_RELOC_FRV_LO16,
9 kx BFD_RELOC_FRV_HI16,
9 kx BFD_RELOC_FRV_GPREL12,
9 kx BFD_RELOC_FRV_GPRELU12,
9 kx BFD_RELOC_FRV_GPREL32,
9 kx BFD_RELOC_FRV_GPRELHI,
9 kx BFD_RELOC_FRV_GPRELLO,
9 kx BFD_RELOC_FRV_GOT12,
9 kx BFD_RELOC_FRV_GOTHI,
9 kx BFD_RELOC_FRV_GOTLO,
9 kx BFD_RELOC_FRV_FUNCDESC,
9 kx BFD_RELOC_FRV_FUNCDESC_GOT12,
9 kx BFD_RELOC_FRV_FUNCDESC_GOTHI,
9 kx BFD_RELOC_FRV_FUNCDESC_GOTLO,
9 kx BFD_RELOC_FRV_FUNCDESC_VALUE,
9 kx BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
9 kx BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
9 kx BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
9 kx BFD_RELOC_FRV_GOTOFF12,
9 kx BFD_RELOC_FRV_GOTOFFHI,
9 kx BFD_RELOC_FRV_GOTOFFLO,
9 kx BFD_RELOC_FRV_GETTLSOFF,
9 kx BFD_RELOC_FRV_TLSDESC_VALUE,
9 kx BFD_RELOC_FRV_GOTTLSDESC12,
9 kx BFD_RELOC_FRV_GOTTLSDESCHI,
9 kx BFD_RELOC_FRV_GOTTLSDESCLO,
9 kx BFD_RELOC_FRV_TLSMOFF12,
9 kx BFD_RELOC_FRV_TLSMOFFHI,
9 kx BFD_RELOC_FRV_TLSMOFFLO,
9 kx BFD_RELOC_FRV_GOTTLSOFF12,
9 kx BFD_RELOC_FRV_GOTTLSOFFHI,
9 kx BFD_RELOC_FRV_GOTTLSOFFLO,
9 kx BFD_RELOC_FRV_TLSOFF,
9 kx BFD_RELOC_FRV_TLSDESC_RELAX,
9 kx BFD_RELOC_FRV_GETTLSOFF_RELAX,
9 kx BFD_RELOC_FRV_TLSOFF_RELAX,
9 kx BFD_RELOC_FRV_TLSMOFF,
9 kx
9 kx
9 kx /* This is a 24bit GOT-relative reloc for the mn10300. */
9 kx BFD_RELOC_MN10300_GOTOFF24,
9 kx
9 kx /* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
9 kx in the instruction. */
9 kx BFD_RELOC_MN10300_GOT32,
9 kx
9 kx /* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
9 kx in the instruction. */
9 kx BFD_RELOC_MN10300_GOT24,
9 kx
9 kx /* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
9 kx in the instruction. */
9 kx BFD_RELOC_MN10300_GOT16,
9 kx
9 kx /* Copy symbol at runtime. */
9 kx BFD_RELOC_MN10300_COPY,
9 kx
9 kx /* Create GOT entry. */
9 kx BFD_RELOC_MN10300_GLOB_DAT,
9 kx
9 kx /* Create PLT entry. */
9 kx BFD_RELOC_MN10300_JMP_SLOT,
9 kx
9 kx /* Adjust by program base. */
9 kx BFD_RELOC_MN10300_RELATIVE,
9 kx
9 kx /* Together with another reloc targeted at the same location,
9 kx allows for a value that is the difference of two symbols
9 kx in the same section. */
9 kx BFD_RELOC_MN10300_SYM_DIFF,
9 kx
9 kx /* The addend of this reloc is an alignment power that must
9 kx be honoured at the offset's location, regardless of linker
9 kx relaxation. */
9 kx BFD_RELOC_MN10300_ALIGN,
9 kx
9 kx /* Various TLS-related relocations. */
9 kx BFD_RELOC_MN10300_TLS_GD,
9 kx BFD_RELOC_MN10300_TLS_LD,
9 kx BFD_RELOC_MN10300_TLS_LDO,
9 kx BFD_RELOC_MN10300_TLS_GOTIE,
9 kx BFD_RELOC_MN10300_TLS_IE,
9 kx BFD_RELOC_MN10300_TLS_LE,
9 kx BFD_RELOC_MN10300_TLS_DTPMOD,
9 kx BFD_RELOC_MN10300_TLS_DTPOFF,
9 kx BFD_RELOC_MN10300_TLS_TPOFF,
9 kx
9 kx /* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
9 kx instruction. */
9 kx BFD_RELOC_MN10300_32_PCREL,
9 kx
9 kx /* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
9 kx instruction. */
9 kx BFD_RELOC_MN10300_16_PCREL,
9 kx
9 kx
9 kx /* i386/elf relocations */
9 kx BFD_RELOC_386_GOT32,
9 kx BFD_RELOC_386_PLT32,
9 kx BFD_RELOC_386_COPY,
9 kx BFD_RELOC_386_GLOB_DAT,
9 kx BFD_RELOC_386_JUMP_SLOT,
9 kx BFD_RELOC_386_RELATIVE,
9 kx BFD_RELOC_386_GOTOFF,
9 kx BFD_RELOC_386_GOTPC,
9 kx BFD_RELOC_386_TLS_TPOFF,
9 kx BFD_RELOC_386_TLS_IE,
9 kx BFD_RELOC_386_TLS_GOTIE,
9 kx BFD_RELOC_386_TLS_LE,
9 kx BFD_RELOC_386_TLS_GD,
9 kx BFD_RELOC_386_TLS_LDM,
9 kx BFD_RELOC_386_TLS_LDO_32,
9 kx BFD_RELOC_386_TLS_IE_32,
9 kx BFD_RELOC_386_TLS_LE_32,
9 kx BFD_RELOC_386_TLS_DTPMOD32,
9 kx BFD_RELOC_386_TLS_DTPOFF32,
9 kx BFD_RELOC_386_TLS_TPOFF32,
9 kx BFD_RELOC_386_TLS_GOTDESC,
9 kx BFD_RELOC_386_TLS_DESC_CALL,
9 kx BFD_RELOC_386_TLS_DESC,
9 kx BFD_RELOC_386_IRELATIVE,
9 kx BFD_RELOC_386_GOT32X,
9 kx
9 kx /* x86-64/elf relocations */
9 kx BFD_RELOC_X86_64_GOT32,
9 kx BFD_RELOC_X86_64_PLT32,
9 kx BFD_RELOC_X86_64_COPY,
9 kx BFD_RELOC_X86_64_GLOB_DAT,
9 kx BFD_RELOC_X86_64_JUMP_SLOT,
9 kx BFD_RELOC_X86_64_RELATIVE,
9 kx BFD_RELOC_X86_64_GOTPCREL,
9 kx BFD_RELOC_X86_64_32S,
9 kx BFD_RELOC_X86_64_DTPMOD64,
9 kx BFD_RELOC_X86_64_DTPOFF64,
9 kx BFD_RELOC_X86_64_TPOFF64,
9 kx BFD_RELOC_X86_64_TLSGD,
9 kx BFD_RELOC_X86_64_TLSLD,
9 kx BFD_RELOC_X86_64_DTPOFF32,
9 kx BFD_RELOC_X86_64_GOTTPOFF,
9 kx BFD_RELOC_X86_64_TPOFF32,
9 kx BFD_RELOC_X86_64_GOTOFF64,
9 kx BFD_RELOC_X86_64_GOTPC32,
9 kx BFD_RELOC_X86_64_GOT64,
9 kx BFD_RELOC_X86_64_GOTPCREL64,
9 kx BFD_RELOC_X86_64_GOTPC64,
9 kx BFD_RELOC_X86_64_GOTPLT64,
9 kx BFD_RELOC_X86_64_PLTOFF64,
9 kx BFD_RELOC_X86_64_GOTPC32_TLSDESC,
9 kx BFD_RELOC_X86_64_TLSDESC_CALL,
9 kx BFD_RELOC_X86_64_TLSDESC,
9 kx BFD_RELOC_X86_64_IRELATIVE,
9 kx BFD_RELOC_X86_64_PC32_BND,
9 kx BFD_RELOC_X86_64_PLT32_BND,
9 kx BFD_RELOC_X86_64_GOTPCRELX,
9 kx BFD_RELOC_X86_64_REX_GOTPCRELX,
9 kx
9 kx /* ns32k relocations */
9 kx BFD_RELOC_NS32K_IMM_8,
9 kx BFD_RELOC_NS32K_IMM_16,
9 kx BFD_RELOC_NS32K_IMM_32,
9 kx BFD_RELOC_NS32K_IMM_8_PCREL,
9 kx BFD_RELOC_NS32K_IMM_16_PCREL,
9 kx BFD_RELOC_NS32K_IMM_32_PCREL,
9 kx BFD_RELOC_NS32K_DISP_8,
9 kx BFD_RELOC_NS32K_DISP_16,
9 kx BFD_RELOC_NS32K_DISP_32,
9 kx BFD_RELOC_NS32K_DISP_8_PCREL,
9 kx BFD_RELOC_NS32K_DISP_16_PCREL,
9 kx BFD_RELOC_NS32K_DISP_32_PCREL,
9 kx
9 kx /* PDP11 relocations */
9 kx BFD_RELOC_PDP11_DISP_8_PCREL,
9 kx BFD_RELOC_PDP11_DISP_6_PCREL,
9 kx
9 kx /* Picojava relocs. Not all of these appear in object files. */
9 kx BFD_RELOC_PJ_CODE_HI16,
9 kx BFD_RELOC_PJ_CODE_LO16,
9 kx BFD_RELOC_PJ_CODE_DIR16,
9 kx BFD_RELOC_PJ_CODE_DIR32,
9 kx BFD_RELOC_PJ_CODE_REL16,
9 kx BFD_RELOC_PJ_CODE_REL32,
9 kx
9 kx /* Power(rs6000) and PowerPC relocations. */
9 kx BFD_RELOC_PPC_B26,
9 kx BFD_RELOC_PPC_BA26,
9 kx BFD_RELOC_PPC_TOC16,
9 kx BFD_RELOC_PPC_TOC16_LO,
9 kx BFD_RELOC_PPC_TOC16_HI,
9 kx BFD_RELOC_PPC_B16,
9 kx BFD_RELOC_PPC_B16_BRTAKEN,
9 kx BFD_RELOC_PPC_B16_BRNTAKEN,
9 kx BFD_RELOC_PPC_BA16,
9 kx BFD_RELOC_PPC_BA16_BRTAKEN,
9 kx BFD_RELOC_PPC_BA16_BRNTAKEN,
9 kx BFD_RELOC_PPC_COPY,
9 kx BFD_RELOC_PPC_GLOB_DAT,
9 kx BFD_RELOC_PPC_JMP_SLOT,
9 kx BFD_RELOC_PPC_RELATIVE,
9 kx BFD_RELOC_PPC_LOCAL24PC,
9 kx BFD_RELOC_PPC_EMB_NADDR32,
9 kx BFD_RELOC_PPC_EMB_NADDR16,
9 kx BFD_RELOC_PPC_EMB_NADDR16_LO,
9 kx BFD_RELOC_PPC_EMB_NADDR16_HI,
9 kx BFD_RELOC_PPC_EMB_NADDR16_HA,
9 kx BFD_RELOC_PPC_EMB_SDAI16,
9 kx BFD_RELOC_PPC_EMB_SDA2I16,
9 kx BFD_RELOC_PPC_EMB_SDA2REL,
9 kx BFD_RELOC_PPC_EMB_SDA21,
9 kx BFD_RELOC_PPC_EMB_MRKREF,
9 kx BFD_RELOC_PPC_EMB_RELSEC16,
9 kx BFD_RELOC_PPC_EMB_RELST_LO,
9 kx BFD_RELOC_PPC_EMB_RELST_HI,
9 kx BFD_RELOC_PPC_EMB_RELST_HA,
9 kx BFD_RELOC_PPC_EMB_BIT_FLD,
9 kx BFD_RELOC_PPC_EMB_RELSDA,
9 kx BFD_RELOC_PPC_VLE_REL8,
9 kx BFD_RELOC_PPC_VLE_REL15,
9 kx BFD_RELOC_PPC_VLE_REL24,
9 kx BFD_RELOC_PPC_VLE_LO16A,
9 kx BFD_RELOC_PPC_VLE_LO16D,
9 kx BFD_RELOC_PPC_VLE_HI16A,
9 kx BFD_RELOC_PPC_VLE_HI16D,
9 kx BFD_RELOC_PPC_VLE_HA16A,
9 kx BFD_RELOC_PPC_VLE_HA16D,
9 kx BFD_RELOC_PPC_VLE_SDA21,
9 kx BFD_RELOC_PPC_VLE_SDA21_LO,
9 kx BFD_RELOC_PPC_VLE_SDAREL_LO16A,
9 kx BFD_RELOC_PPC_VLE_SDAREL_LO16D,
9 kx BFD_RELOC_PPC_VLE_SDAREL_HI16A,
9 kx BFD_RELOC_PPC_VLE_SDAREL_HI16D,
9 kx BFD_RELOC_PPC_VLE_SDAREL_HA16A,
9 kx BFD_RELOC_PPC_VLE_SDAREL_HA16D,
9 kx BFD_RELOC_PPC_16DX_HA,
9 kx BFD_RELOC_PPC_REL16DX_HA,
9 kx BFD_RELOC_PPC_NEG,
9 kx BFD_RELOC_PPC64_HIGHER,
9 kx BFD_RELOC_PPC64_HIGHER_S,
9 kx BFD_RELOC_PPC64_HIGHEST,
9 kx BFD_RELOC_PPC64_HIGHEST_S,
9 kx BFD_RELOC_PPC64_TOC16_LO,
9 kx BFD_RELOC_PPC64_TOC16_HI,
9 kx BFD_RELOC_PPC64_TOC16_HA,
9 kx BFD_RELOC_PPC64_TOC,
9 kx BFD_RELOC_PPC64_PLTGOT16,
9 kx BFD_RELOC_PPC64_PLTGOT16_LO,
9 kx BFD_RELOC_PPC64_PLTGOT16_HI,
9 kx BFD_RELOC_PPC64_PLTGOT16_HA,
9 kx BFD_RELOC_PPC64_ADDR16_DS,
9 kx BFD_RELOC_PPC64_ADDR16_LO_DS,
9 kx BFD_RELOC_PPC64_GOT16_DS,
9 kx BFD_RELOC_PPC64_GOT16_LO_DS,
9 kx BFD_RELOC_PPC64_PLT16_LO_DS,
9 kx BFD_RELOC_PPC64_SECTOFF_DS,
9 kx BFD_RELOC_PPC64_SECTOFF_LO_DS,
9 kx BFD_RELOC_PPC64_TOC16_DS,
9 kx BFD_RELOC_PPC64_TOC16_LO_DS,
9 kx BFD_RELOC_PPC64_PLTGOT16_DS,
9 kx BFD_RELOC_PPC64_PLTGOT16_LO_DS,
9 kx BFD_RELOC_PPC64_ADDR16_HIGH,
9 kx BFD_RELOC_PPC64_ADDR16_HIGHA,
9 kx BFD_RELOC_PPC64_REL16_HIGH,
9 kx BFD_RELOC_PPC64_REL16_HIGHA,
9 kx BFD_RELOC_PPC64_REL16_HIGHER,
9 kx BFD_RELOC_PPC64_REL16_HIGHERA,
9 kx BFD_RELOC_PPC64_REL16_HIGHEST,
9 kx BFD_RELOC_PPC64_REL16_HIGHESTA,
9 kx BFD_RELOC_PPC64_ADDR64_LOCAL,
9 kx BFD_RELOC_PPC64_ENTRY,
9 kx BFD_RELOC_PPC64_REL24_NOTOC,
9 kx BFD_RELOC_PPC64_REL24_P9NOTOC,
9 kx BFD_RELOC_PPC64_D34,
9 kx BFD_RELOC_PPC64_D34_LO,
9 kx BFD_RELOC_PPC64_D34_HI30,
9 kx BFD_RELOC_PPC64_D34_HA30,
9 kx BFD_RELOC_PPC64_PCREL34,
9 kx BFD_RELOC_PPC64_GOT_PCREL34,
9 kx BFD_RELOC_PPC64_PLT_PCREL34,
9 kx BFD_RELOC_PPC64_ADDR16_HIGHER34,
9 kx BFD_RELOC_PPC64_ADDR16_HIGHERA34,
9 kx BFD_RELOC_PPC64_ADDR16_HIGHEST34,
9 kx BFD_RELOC_PPC64_ADDR16_HIGHESTA34,
9 kx BFD_RELOC_PPC64_REL16_HIGHER34,
9 kx BFD_RELOC_PPC64_REL16_HIGHERA34,
9 kx BFD_RELOC_PPC64_REL16_HIGHEST34,
9 kx BFD_RELOC_PPC64_REL16_HIGHESTA34,
9 kx BFD_RELOC_PPC64_D28,
9 kx BFD_RELOC_PPC64_PCREL28,
9 kx
9 kx /* PowerPC and PowerPC64 thread-local storage relocations. */
9 kx BFD_RELOC_PPC_TLS,
9 kx BFD_RELOC_PPC_TLSGD,
9 kx BFD_RELOC_PPC_TLSLD,
9 kx BFD_RELOC_PPC_TLSLE,
9 kx BFD_RELOC_PPC_TLSIE,
9 kx BFD_RELOC_PPC_TLSM,
9 kx BFD_RELOC_PPC_TLSML,
9 kx BFD_RELOC_PPC_DTPMOD,
9 kx BFD_RELOC_PPC_TPREL16,
9 kx BFD_RELOC_PPC_TPREL16_LO,
9 kx BFD_RELOC_PPC_TPREL16_HI,
9 kx BFD_RELOC_PPC_TPREL16_HA,
9 kx BFD_RELOC_PPC_TPREL,
9 kx BFD_RELOC_PPC_DTPREL16,
9 kx BFD_RELOC_PPC_DTPREL16_LO,
9 kx BFD_RELOC_PPC_DTPREL16_HI,
9 kx BFD_RELOC_PPC_DTPREL16_HA,
9 kx BFD_RELOC_PPC_DTPREL,
9 kx BFD_RELOC_PPC_GOT_TLSGD16,
9 kx BFD_RELOC_PPC_GOT_TLSGD16_LO,
9 kx BFD_RELOC_PPC_GOT_TLSGD16_HI,
9 kx BFD_RELOC_PPC_GOT_TLSGD16_HA,
9 kx BFD_RELOC_PPC_GOT_TLSLD16,
9 kx BFD_RELOC_PPC_GOT_TLSLD16_LO,
9 kx BFD_RELOC_PPC_GOT_TLSLD16_HI,
9 kx BFD_RELOC_PPC_GOT_TLSLD16_HA,
9 kx BFD_RELOC_PPC_GOT_TPREL16,
9 kx BFD_RELOC_PPC_GOT_TPREL16_LO,
9 kx BFD_RELOC_PPC_GOT_TPREL16_HI,
9 kx BFD_RELOC_PPC_GOT_TPREL16_HA,
9 kx BFD_RELOC_PPC_GOT_DTPREL16,
9 kx BFD_RELOC_PPC_GOT_DTPREL16_LO,
9 kx BFD_RELOC_PPC_GOT_DTPREL16_HI,
9 kx BFD_RELOC_PPC_GOT_DTPREL16_HA,
9 kx BFD_RELOC_PPC64_TLSGD,
9 kx BFD_RELOC_PPC64_TLSLD,
9 kx BFD_RELOC_PPC64_TLSLE,
9 kx BFD_RELOC_PPC64_TLSIE,
9 kx BFD_RELOC_PPC64_TLSM,
9 kx BFD_RELOC_PPC64_TLSML,
9 kx BFD_RELOC_PPC64_TPREL16_DS,
9 kx BFD_RELOC_PPC64_TPREL16_LO_DS,
9 kx BFD_RELOC_PPC64_TPREL16_HIGH,
9 kx BFD_RELOC_PPC64_TPREL16_HIGHA,
9 kx BFD_RELOC_PPC64_TPREL16_HIGHER,
9 kx BFD_RELOC_PPC64_TPREL16_HIGHERA,
9 kx BFD_RELOC_PPC64_TPREL16_HIGHEST,
9 kx BFD_RELOC_PPC64_TPREL16_HIGHESTA,
9 kx BFD_RELOC_PPC64_DTPREL16_DS,
9 kx BFD_RELOC_PPC64_DTPREL16_LO_DS,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGH,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGHA,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGHER,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGHERA,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGHEST,
9 kx BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
9 kx BFD_RELOC_PPC64_TPREL34,
9 kx BFD_RELOC_PPC64_DTPREL34,
9 kx BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
9 kx BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
9 kx BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
9 kx BFD_RELOC_PPC64_GOT_DTPREL_PCREL34,
9 kx BFD_RELOC_PPC64_TLS_PCREL,
9 kx
9 kx /* IBM 370/390 relocations */
9 kx BFD_RELOC_I370_D12,
9 kx
9 kx /* The type of reloc used to build a constructor table - at the moment
9 kx probably a 32 bit wide absolute relocation, but the target can choose.
9 kx It generally does map to one of the other relocation types. */
9 kx BFD_RELOC_CTOR,
9 kx
9 kx /* ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
9 kx not stored in the instruction. */
9 kx BFD_RELOC_ARM_PCREL_BRANCH,
9 kx
9 kx /* ARM 26 bit pc-relative branch. The lowest bit must be zero and is
9 kx not stored in the instruction. The 2nd lowest bit comes from a 1 bit
9 kx field in the instruction. */
9 kx BFD_RELOC_ARM_PCREL_BLX,
9 kx
9 kx /* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
9 kx not stored in the instruction. The 2nd lowest bit comes from a 1 bit
9 kx field in the instruction. */
9 kx BFD_RELOC_THUMB_PCREL_BLX,
9 kx
9 kx /* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
9 kx BFD_RELOC_ARM_PCREL_CALL,
9 kx
9 kx /* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
9 kx BFD_RELOC_ARM_PCREL_JUMP,
9 kx
9 kx /* ARM 5-bit pc-relative branch for Branch Future instructions. */
9 kx BFD_RELOC_THUMB_PCREL_BRANCH5,
9 kx
9 kx /* ARM 6-bit pc-relative branch for BFCSEL instruction. */
9 kx BFD_RELOC_THUMB_PCREL_BFCSEL,
9 kx
9 kx /* ARM 17-bit pc-relative branch for Branch Future instructions. */
9 kx BFD_RELOC_ARM_THUMB_BF17,
9 kx
9 kx /* ARM 13-bit pc-relative branch for BFCSEL instruction. */
9 kx BFD_RELOC_ARM_THUMB_BF13,
9 kx
9 kx /* ARM 19-bit pc-relative branch for Branch Future Link instruction. */
9 kx BFD_RELOC_ARM_THUMB_BF19,
9 kx
9 kx /* ARM 12-bit pc-relative branch for Low Overhead Loop instructions. */
9 kx BFD_RELOC_ARM_THUMB_LOOP12,
9 kx
9 kx /* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
9 kx The lowest bit must be zero and is not stored in the instruction.
9 kx Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
9 kx "nn" one smaller in all cases. Note further that BRANCH23
9 kx corresponds to R_ARM_THM_CALL. */
9 kx BFD_RELOC_THUMB_PCREL_BRANCH7,
9 kx BFD_RELOC_THUMB_PCREL_BRANCH9,
9 kx BFD_RELOC_THUMB_PCREL_BRANCH12,
9 kx BFD_RELOC_THUMB_PCREL_BRANCH20,
9 kx BFD_RELOC_THUMB_PCREL_BRANCH23,
9 kx BFD_RELOC_THUMB_PCREL_BRANCH25,
9 kx
9 kx /* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
9 kx BFD_RELOC_ARM_OFFSET_IMM,
9 kx
9 kx /* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
9 kx BFD_RELOC_ARM_THUMB_OFFSET,
9 kx
9 kx /* Pc-relative or absolute relocation depending on target. Used for
9 kx entries in .init_array sections. */
9 kx BFD_RELOC_ARM_TARGET1,
9 kx
9 kx /* Read-only segment base relative address. */
9 kx BFD_RELOC_ARM_ROSEGREL32,
9 kx
9 kx /* Data segment base relative address. */
9 kx BFD_RELOC_ARM_SBREL32,
9 kx
9 kx /* This reloc is used for references to RTTI data from exception handling
9 kx tables. The actual definition depends on the target. It may be a
9 kx pc-relative or some form of GOT-indirect relocation. */
9 kx BFD_RELOC_ARM_TARGET2,
9 kx
9 kx /* 31-bit PC relative address. */
9 kx BFD_RELOC_ARM_PREL31,
9 kx
9 kx /* Low and High halfword relocations for MOVW and MOVT instructions. */
9 kx BFD_RELOC_ARM_MOVW,
9 kx BFD_RELOC_ARM_MOVT,
9 kx BFD_RELOC_ARM_MOVW_PCREL,
9 kx BFD_RELOC_ARM_MOVT_PCREL,
9 kx BFD_RELOC_ARM_THUMB_MOVW,
9 kx BFD_RELOC_ARM_THUMB_MOVT,
9 kx BFD_RELOC_ARM_THUMB_MOVW_PCREL,
9 kx BFD_RELOC_ARM_THUMB_MOVT_PCREL,
9 kx
9 kx /* ARM FDPIC specific relocations. */
9 kx BFD_RELOC_ARM_GOTFUNCDESC,
9 kx BFD_RELOC_ARM_GOTOFFFUNCDESC,
9 kx BFD_RELOC_ARM_FUNCDESC,
9 kx BFD_RELOC_ARM_FUNCDESC_VALUE,
9 kx BFD_RELOC_ARM_TLS_GD32_FDPIC,
9 kx BFD_RELOC_ARM_TLS_LDM32_FDPIC,
9 kx BFD_RELOC_ARM_TLS_IE32_FDPIC,
9 kx
9 kx /* Relocations for setting up GOTs and PLTs for shared libraries. */
9 kx BFD_RELOC_ARM_JUMP_SLOT,
9 kx BFD_RELOC_ARM_GLOB_DAT,
9 kx BFD_RELOC_ARM_GOT32,
9 kx BFD_RELOC_ARM_PLT32,
9 kx BFD_RELOC_ARM_RELATIVE,
9 kx BFD_RELOC_ARM_GOTOFF,
9 kx BFD_RELOC_ARM_GOTPC,
9 kx BFD_RELOC_ARM_GOT_PREL,
9 kx
9 kx /* ARM thread-local storage relocations. */
9 kx BFD_RELOC_ARM_TLS_GD32,
9 kx BFD_RELOC_ARM_TLS_LDO32,
9 kx BFD_RELOC_ARM_TLS_LDM32,
9 kx BFD_RELOC_ARM_TLS_DTPOFF32,
9 kx BFD_RELOC_ARM_TLS_DTPMOD32,
9 kx BFD_RELOC_ARM_TLS_TPOFF32,
9 kx BFD_RELOC_ARM_TLS_IE32,
9 kx BFD_RELOC_ARM_TLS_LE32,
9 kx BFD_RELOC_ARM_TLS_GOTDESC,
9 kx BFD_RELOC_ARM_TLS_CALL,
9 kx BFD_RELOC_ARM_THM_TLS_CALL,
9 kx BFD_RELOC_ARM_TLS_DESCSEQ,
9 kx BFD_RELOC_ARM_THM_TLS_DESCSEQ,
9 kx BFD_RELOC_ARM_TLS_DESC,
9 kx
9 kx /* ARM group relocations. */
9 kx BFD_RELOC_ARM_ALU_PC_G0_NC,
9 kx BFD_RELOC_ARM_ALU_PC_G0,
9 kx BFD_RELOC_ARM_ALU_PC_G1_NC,
9 kx BFD_RELOC_ARM_ALU_PC_G1,
9 kx BFD_RELOC_ARM_ALU_PC_G2,
9 kx BFD_RELOC_ARM_LDR_PC_G0,
9 kx BFD_RELOC_ARM_LDR_PC_G1,
9 kx BFD_RELOC_ARM_LDR_PC_G2,
9 kx BFD_RELOC_ARM_LDRS_PC_G0,
9 kx BFD_RELOC_ARM_LDRS_PC_G1,
9 kx BFD_RELOC_ARM_LDRS_PC_G2,
9 kx BFD_RELOC_ARM_LDC_PC_G0,
9 kx BFD_RELOC_ARM_LDC_PC_G1,
9 kx BFD_RELOC_ARM_LDC_PC_G2,
9 kx BFD_RELOC_ARM_ALU_SB_G0_NC,
9 kx BFD_RELOC_ARM_ALU_SB_G0,
9 kx BFD_RELOC_ARM_ALU_SB_G1_NC,
9 kx BFD_RELOC_ARM_ALU_SB_G1,
9 kx BFD_RELOC_ARM_ALU_SB_G2,
9 kx BFD_RELOC_ARM_LDR_SB_G0,
9 kx BFD_RELOC_ARM_LDR_SB_G1,
9 kx BFD_RELOC_ARM_LDR_SB_G2,
9 kx BFD_RELOC_ARM_LDRS_SB_G0,
9 kx BFD_RELOC_ARM_LDRS_SB_G1,
9 kx BFD_RELOC_ARM_LDRS_SB_G2,
9 kx BFD_RELOC_ARM_LDC_SB_G0,
9 kx BFD_RELOC_ARM_LDC_SB_G1,
9 kx BFD_RELOC_ARM_LDC_SB_G2,
9 kx
9 kx /* Annotation of BX instructions. */
9 kx BFD_RELOC_ARM_V4BX,
9 kx
9 kx /* ARM support for STT_GNU_IFUNC. */
9 kx BFD_RELOC_ARM_IRELATIVE,
9 kx
9 kx /* Thumb1 relocations to support execute-only code. */
9 kx BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC,
9 kx BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC,
9 kx BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC,
9 kx BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC,
9 kx
9 kx /* These relocs are only used within the ARM assembler. They are not
9 kx (at present) written to any object files. */
9 kx BFD_RELOC_ARM_IMMEDIATE,
9 kx BFD_RELOC_ARM_ADRL_IMMEDIATE,
9 kx BFD_RELOC_ARM_T32_IMMEDIATE,
9 kx BFD_RELOC_ARM_T32_ADD_IMM,
9 kx BFD_RELOC_ARM_T32_IMM12,
9 kx BFD_RELOC_ARM_T32_ADD_PC12,
9 kx BFD_RELOC_ARM_SHIFT_IMM,
9 kx BFD_RELOC_ARM_SMC,
9 kx BFD_RELOC_ARM_HVC,
9 kx BFD_RELOC_ARM_SWI,
9 kx BFD_RELOC_ARM_MULTI,
9 kx BFD_RELOC_ARM_CP_OFF_IMM,
9 kx BFD_RELOC_ARM_CP_OFF_IMM_S2,
9 kx BFD_RELOC_ARM_T32_CP_OFF_IMM,
9 kx BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
9 kx BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM,
9 kx BFD_RELOC_ARM_ADR_IMM,
9 kx BFD_RELOC_ARM_LDR_IMM,
9 kx BFD_RELOC_ARM_LITERAL,
9 kx BFD_RELOC_ARM_IN_POOL,
9 kx BFD_RELOC_ARM_OFFSET_IMM8,
9 kx BFD_RELOC_ARM_T32_OFFSET_U8,
9 kx BFD_RELOC_ARM_T32_OFFSET_IMM,
9 kx BFD_RELOC_ARM_HWLITERAL,
9 kx BFD_RELOC_ARM_THUMB_ADD,
9 kx BFD_RELOC_ARM_THUMB_IMM,
9 kx BFD_RELOC_ARM_THUMB_SHIFT,
9 kx
9 kx /* Renesas / SuperH SH relocs. Not all of these appear in object files. */
9 kx BFD_RELOC_SH_PCDISP8BY2,
9 kx BFD_RELOC_SH_PCDISP12BY2,
9 kx BFD_RELOC_SH_IMM3,
9 kx BFD_RELOC_SH_IMM3U,
9 kx BFD_RELOC_SH_DISP12,
9 kx BFD_RELOC_SH_DISP12BY2,
9 kx BFD_RELOC_SH_DISP12BY4,
9 kx BFD_RELOC_SH_DISP12BY8,
9 kx BFD_RELOC_SH_DISP20,
9 kx BFD_RELOC_SH_DISP20BY8,
9 kx BFD_RELOC_SH_IMM4,
9 kx BFD_RELOC_SH_IMM4BY2,
9 kx BFD_RELOC_SH_IMM4BY4,
9 kx BFD_RELOC_SH_IMM8,
9 kx BFD_RELOC_SH_IMM8BY2,
9 kx BFD_RELOC_SH_IMM8BY4,
9 kx BFD_RELOC_SH_PCRELIMM8BY2,
9 kx BFD_RELOC_SH_PCRELIMM8BY4,
9 kx BFD_RELOC_SH_SWITCH16,
9 kx BFD_RELOC_SH_SWITCH32,
9 kx BFD_RELOC_SH_USES,
9 kx BFD_RELOC_SH_COUNT,
9 kx BFD_RELOC_SH_ALIGN,
9 kx BFD_RELOC_SH_CODE,
9 kx BFD_RELOC_SH_DATA,
9 kx BFD_RELOC_SH_LABEL,
9 kx BFD_RELOC_SH_LOOP_START,
9 kx BFD_RELOC_SH_LOOP_END,
9 kx BFD_RELOC_SH_COPY,
9 kx BFD_RELOC_SH_GLOB_DAT,
9 kx BFD_RELOC_SH_JMP_SLOT,
9 kx BFD_RELOC_SH_RELATIVE,
9 kx BFD_RELOC_SH_GOTPC,
9 kx BFD_RELOC_SH_GOT_LOW16,
9 kx BFD_RELOC_SH_GOT_MEDLOW16,
9 kx BFD_RELOC_SH_GOT_MEDHI16,
9 kx BFD_RELOC_SH_GOT_HI16,
9 kx BFD_RELOC_SH_GOTPLT_LOW16,
9 kx BFD_RELOC_SH_GOTPLT_MEDLOW16,
9 kx BFD_RELOC_SH_GOTPLT_MEDHI16,
9 kx BFD_RELOC_SH_GOTPLT_HI16,
9 kx BFD_RELOC_SH_PLT_LOW16,
9 kx BFD_RELOC_SH_PLT_MEDLOW16,
9 kx BFD_RELOC_SH_PLT_MEDHI16,
9 kx BFD_RELOC_SH_PLT_HI16,
9 kx BFD_RELOC_SH_GOTOFF_LOW16,
9 kx BFD_RELOC_SH_GOTOFF_MEDLOW16,
9 kx BFD_RELOC_SH_GOTOFF_MEDHI16,
9 kx BFD_RELOC_SH_GOTOFF_HI16,
9 kx BFD_RELOC_SH_GOTPC_LOW16,
9 kx BFD_RELOC_SH_GOTPC_MEDLOW16,
9 kx BFD_RELOC_SH_GOTPC_MEDHI16,
9 kx BFD_RELOC_SH_GOTPC_HI16,
9 kx BFD_RELOC_SH_COPY64,
9 kx BFD_RELOC_SH_GLOB_DAT64,
9 kx BFD_RELOC_SH_JMP_SLOT64,
9 kx BFD_RELOC_SH_RELATIVE64,
9 kx BFD_RELOC_SH_GOT10BY4,
9 kx BFD_RELOC_SH_GOT10BY8,
9 kx BFD_RELOC_SH_GOTPLT10BY4,
9 kx BFD_RELOC_SH_GOTPLT10BY8,
9 kx BFD_RELOC_SH_GOTPLT32,
9 kx BFD_RELOC_SH_SHMEDIA_CODE,
9 kx BFD_RELOC_SH_IMMU5,
9 kx BFD_RELOC_SH_IMMS6,
9 kx BFD_RELOC_SH_IMMS6BY32,
9 kx BFD_RELOC_SH_IMMU6,
9 kx BFD_RELOC_SH_IMMS10,
9 kx BFD_RELOC_SH_IMMS10BY2,
9 kx BFD_RELOC_SH_IMMS10BY4,
9 kx BFD_RELOC_SH_IMMS10BY8,
9 kx BFD_RELOC_SH_IMMS16,
9 kx BFD_RELOC_SH_IMMU16,
9 kx BFD_RELOC_SH_IMM_LOW16,
9 kx BFD_RELOC_SH_IMM_LOW16_PCREL,
9 kx BFD_RELOC_SH_IMM_MEDLOW16,
9 kx BFD_RELOC_SH_IMM_MEDLOW16_PCREL,
9 kx BFD_RELOC_SH_IMM_MEDHI16,
9 kx BFD_RELOC_SH_IMM_MEDHI16_PCREL,
9 kx BFD_RELOC_SH_IMM_HI16,
9 kx BFD_RELOC_SH_IMM_HI16_PCREL,
9 kx BFD_RELOC_SH_PT_16,
9 kx BFD_RELOC_SH_TLS_GD_32,
9 kx BFD_RELOC_SH_TLS_LD_32,
9 kx BFD_RELOC_SH_TLS_LDO_32,
9 kx BFD_RELOC_SH_TLS_IE_32,
9 kx BFD_RELOC_SH_TLS_LE_32,
9 kx BFD_RELOC_SH_TLS_DTPMOD32,
9 kx BFD_RELOC_SH_TLS_DTPOFF32,
9 kx BFD_RELOC_SH_TLS_TPOFF32,
9 kx BFD_RELOC_SH_GOT20,
9 kx BFD_RELOC_SH_GOTOFF20,
9 kx BFD_RELOC_SH_GOTFUNCDESC,
9 kx BFD_RELOC_SH_GOTFUNCDESC20,
9 kx BFD_RELOC_SH_GOTOFFFUNCDESC,
9 kx BFD_RELOC_SH_GOTOFFFUNCDESC20,
9 kx BFD_RELOC_SH_FUNCDESC,
9 kx
9 kx /* ARC relocs. */
9 kx BFD_RELOC_ARC_NONE,
9 kx BFD_RELOC_ARC_8,
9 kx BFD_RELOC_ARC_16,
9 kx BFD_RELOC_ARC_24,
9 kx BFD_RELOC_ARC_32,
9 kx BFD_RELOC_ARC_N8,
9 kx BFD_RELOC_ARC_N16,
9 kx BFD_RELOC_ARC_N24,
9 kx BFD_RELOC_ARC_N32,
9 kx BFD_RELOC_ARC_SDA,
9 kx BFD_RELOC_ARC_SECTOFF,
9 kx BFD_RELOC_ARC_S21H_PCREL,
9 kx BFD_RELOC_ARC_S21W_PCREL,
9 kx BFD_RELOC_ARC_S25H_PCREL,
9 kx BFD_RELOC_ARC_S25W_PCREL,
9 kx BFD_RELOC_ARC_SDA32,
9 kx BFD_RELOC_ARC_SDA_LDST,
9 kx BFD_RELOC_ARC_SDA_LDST1,
9 kx BFD_RELOC_ARC_SDA_LDST2,
9 kx BFD_RELOC_ARC_SDA16_LD,
9 kx BFD_RELOC_ARC_SDA16_LD1,
9 kx BFD_RELOC_ARC_SDA16_LD2,
9 kx BFD_RELOC_ARC_S13_PCREL,
9 kx BFD_RELOC_ARC_W,
9 kx BFD_RELOC_ARC_32_ME,
9 kx BFD_RELOC_ARC_32_ME_S,
9 kx BFD_RELOC_ARC_N32_ME,
9 kx BFD_RELOC_ARC_SECTOFF_ME,
9 kx BFD_RELOC_ARC_SDA32_ME,
9 kx BFD_RELOC_ARC_W_ME,
9 kx BFD_RELOC_AC_SECTOFF_U8,
9 kx BFD_RELOC_AC_SECTOFF_U8_1,
9 kx BFD_RELOC_AC_SECTOFF_U8_2,
9 kx BFD_RELOC_AC_SECTOFF_S9,
9 kx BFD_RELOC_AC_SECTOFF_S9_1,
9 kx BFD_RELOC_AC_SECTOFF_S9_2,
9 kx BFD_RELOC_ARC_SECTOFF_ME_1,
9 kx BFD_RELOC_ARC_SECTOFF_ME_2,
9 kx BFD_RELOC_ARC_SECTOFF_1,
9 kx BFD_RELOC_ARC_SECTOFF_2,
9 kx BFD_RELOC_ARC_SDA_12,
9 kx BFD_RELOC_ARC_SDA16_ST2,
9 kx BFD_RELOC_ARC_32_PCREL,
9 kx BFD_RELOC_ARC_PC32,
9 kx BFD_RELOC_ARC_GOT32,
9 kx BFD_RELOC_ARC_GOTPC32,
9 kx BFD_RELOC_ARC_PLT32,
9 kx BFD_RELOC_ARC_COPY,
9 kx BFD_RELOC_ARC_GLOB_DAT,
9 kx BFD_RELOC_ARC_JMP_SLOT,
9 kx BFD_RELOC_ARC_RELATIVE,
9 kx BFD_RELOC_ARC_GOTOFF,
9 kx BFD_RELOC_ARC_GOTPC,
9 kx BFD_RELOC_ARC_S21W_PCREL_PLT,
9 kx BFD_RELOC_ARC_S25H_PCREL_PLT,
9 kx BFD_RELOC_ARC_TLS_DTPMOD,
9 kx BFD_RELOC_ARC_TLS_TPOFF,
9 kx BFD_RELOC_ARC_TLS_GD_GOT,
9 kx BFD_RELOC_ARC_TLS_GD_LD,
9 kx BFD_RELOC_ARC_TLS_GD_CALL,
9 kx BFD_RELOC_ARC_TLS_IE_GOT,
9 kx BFD_RELOC_ARC_TLS_DTPOFF,
9 kx BFD_RELOC_ARC_TLS_DTPOFF_S9,
9 kx BFD_RELOC_ARC_TLS_LE_S9,
9 kx BFD_RELOC_ARC_TLS_LE_32,
9 kx BFD_RELOC_ARC_S25W_PCREL_PLT,
9 kx BFD_RELOC_ARC_S21H_PCREL_PLT,
9 kx BFD_RELOC_ARC_NPS_CMEM16,
9 kx BFD_RELOC_ARC_JLI_SECTOFF,
9 kx
9 kx /* ADI Blackfin 16 bit immediate absolute reloc. */
9 kx BFD_RELOC_BFIN_16_IMM,
9 kx
9 kx /* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
9 kx BFD_RELOC_BFIN_16_HIGH,
9 kx
9 kx /* ADI Blackfin 'a' part of LSETUP. */
9 kx BFD_RELOC_BFIN_4_PCREL,
9 kx
9 kx /* ADI Blackfin. */
9 kx BFD_RELOC_BFIN_5_PCREL,
9 kx
9 kx /* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
9 kx BFD_RELOC_BFIN_16_LOW,
9 kx
9 kx /* ADI Blackfin. */
9 kx BFD_RELOC_BFIN_10_PCREL,
9 kx
9 kx /* ADI Blackfin 'b' part of LSETUP. */
9 kx BFD_RELOC_BFIN_11_PCREL,
9 kx
9 kx /* ADI Blackfin. */
9 kx BFD_RELOC_BFIN_12_PCREL_JUMP,
9 kx
9 kx /* ADI Blackfin Short jump, pcrel. */
9 kx BFD_RELOC_BFIN_12_PCREL_JUMP_S,
9 kx
9 kx /* ADI Blackfin Call.x not implemented. */
9 kx BFD_RELOC_BFIN_24_PCREL_CALL_X,
9 kx
9 kx /* ADI Blackfin Long Jump pcrel. */
9 kx BFD_RELOC_BFIN_24_PCREL_JUMP_L,
9 kx
9 kx /* ADI Blackfin FD-PIC relocations. */
9 kx BFD_RELOC_BFIN_GOT17M4,
9 kx BFD_RELOC_BFIN_GOTHI,
9 kx BFD_RELOC_BFIN_GOTLO,
9 kx BFD_RELOC_BFIN_FUNCDESC,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOTHI,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOTLO,
9 kx BFD_RELOC_BFIN_FUNCDESC_VALUE,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
9 kx BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
9 kx BFD_RELOC_BFIN_GOTOFF17M4,
9 kx BFD_RELOC_BFIN_GOTOFFHI,
9 kx BFD_RELOC_BFIN_GOTOFFLO,
9 kx
9 kx /* ADI Blackfin GOT relocation. */
9 kx BFD_RELOC_BFIN_GOT,
9 kx
9 kx /* ADI Blackfin PLTPC relocation. */
9 kx BFD_RELOC_BFIN_PLTPC,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_PUSH,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_CONST,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_ADD,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_SUB,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_MULT,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_DIV,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_MOD,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_LSHIFT,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_RSHIFT,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_AND,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_OR,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_XOR,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_LAND,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_LOR,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_LEN,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_NEG,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_COMP,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_PAGE,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_HWPAGE,
9 kx
9 kx /* ADI Blackfin arithmetic relocation. */
9 kx BFD_ARELOC_BFIN_ADDR,
9 kx
9 kx /* Mitsubishi D10V relocs.
9 kx This is a 10-bit reloc with the right 2 bits
9 kx assumed to be 0. */
9 kx BFD_RELOC_D10V_10_PCREL_R,
9 kx
9 kx /* Mitsubishi D10V relocs.
9 kx This is a 10-bit reloc with the right 2 bits
9 kx assumed to be 0. This is the same as the previous reloc
9 kx except it is in the left container, i.e.,
9 kx shifted left 15 bits. */
9 kx BFD_RELOC_D10V_10_PCREL_L,
9 kx
9 kx /* This is an 18-bit reloc with the right 2 bits
9 kx assumed to be 0. */
9 kx BFD_RELOC_D10V_18,
9 kx
9 kx /* This is an 18-bit reloc with the right 2 bits
9 kx assumed to be 0. */
9 kx BFD_RELOC_D10V_18_PCREL,
9 kx
9 kx /* Mitsubishi D30V relocs.
9 kx This is a 6-bit absolute reloc. */
9 kx BFD_RELOC_D30V_6,
9 kx
9 kx /* This is a 6-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. */
9 kx BFD_RELOC_D30V_9_PCREL,
9 kx
9 kx /* This is a 6-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. Same
9 kx as the previous reloc but on the right side
9 kx of the container. */
9 kx BFD_RELOC_D30V_9_PCREL_R,
9 kx
9 kx /* This is a 12-bit absolute reloc with the
9 kx right 3 bitsassumed to be 0. */
9 kx BFD_RELOC_D30V_15,
9 kx
9 kx /* This is a 12-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. */
9 kx BFD_RELOC_D30V_15_PCREL,
9 kx
9 kx /* This is a 12-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. Same
9 kx as the previous reloc but on the right side
9 kx of the container. */
9 kx BFD_RELOC_D30V_15_PCREL_R,
9 kx
9 kx /* This is an 18-bit absolute reloc with
9 kx the right 3 bits assumed to be 0. */
9 kx BFD_RELOC_D30V_21,
9 kx
9 kx /* This is an 18-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. */
9 kx BFD_RELOC_D30V_21_PCREL,
9 kx
9 kx /* This is an 18-bit pc-relative reloc with
9 kx the right 3 bits assumed to be 0. Same
9 kx as the previous reloc but on the right side
9 kx of the container. */
9 kx BFD_RELOC_D30V_21_PCREL_R,
9 kx
9 kx /* This is a 32-bit absolute reloc. */
9 kx BFD_RELOC_D30V_32,
9 kx
9 kx /* This is a 32-bit pc-relative reloc. */
9 kx BFD_RELOC_D30V_32_PCREL,
9 kx
9 kx /* DLX relocs */
9 kx BFD_RELOC_DLX_HI16_S,
9 kx
9 kx /* DLX relocs */
9 kx BFD_RELOC_DLX_LO16,
9 kx
9 kx /* DLX relocs */
9 kx BFD_RELOC_DLX_JMP26,
9 kx
9 kx /* Renesas M16C/M32C Relocations. */
9 kx BFD_RELOC_M32C_HI8,
9 kx BFD_RELOC_M32C_RL_JUMP,
9 kx BFD_RELOC_M32C_RL_1ADDR,
9 kx BFD_RELOC_M32C_RL_2ADDR,
9 kx
9 kx /* Renesas M32R (formerly Mitsubishi M32R) relocs.
9 kx This is a 24 bit absolute address. */
9 kx BFD_RELOC_M32R_24,
9 kx
9 kx /* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
9 kx BFD_RELOC_M32R_10_PCREL,
9 kx
9 kx /* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
9 kx BFD_RELOC_M32R_18_PCREL,
9 kx
9 kx /* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
9 kx BFD_RELOC_M32R_26_PCREL,
9 kx
9 kx /* This is a 16-bit reloc containing the high 16 bits of an address
9 kx used when the lower 16 bits are treated as unsigned. */
9 kx BFD_RELOC_M32R_HI16_ULO,
9 kx
9 kx /* This is a 16-bit reloc containing the high 16 bits of an address
9 kx used when the lower 16 bits are treated as signed. */
9 kx BFD_RELOC_M32R_HI16_SLO,
9 kx
9 kx /* This is a 16-bit reloc containing the lower 16 bits of an address. */
9 kx BFD_RELOC_M32R_LO16,
9 kx
9 kx /* This is a 16-bit reloc containing the small data area offset for use in
9 kx add3, load, and store instructions. */
9 kx BFD_RELOC_M32R_SDA16,
9 kx
9 kx /* For PIC. */
9 kx BFD_RELOC_M32R_GOT24,
9 kx BFD_RELOC_M32R_26_PLTREL,
9 kx BFD_RELOC_M32R_COPY,
9 kx BFD_RELOC_M32R_GLOB_DAT,
9 kx BFD_RELOC_M32R_JMP_SLOT,
9 kx BFD_RELOC_M32R_RELATIVE,
9 kx BFD_RELOC_M32R_GOTOFF,
9 kx BFD_RELOC_M32R_GOTOFF_HI_ULO,
9 kx BFD_RELOC_M32R_GOTOFF_HI_SLO,
9 kx BFD_RELOC_M32R_GOTOFF_LO,
9 kx BFD_RELOC_M32R_GOTPC24,
9 kx BFD_RELOC_M32R_GOT16_HI_ULO,
9 kx BFD_RELOC_M32R_GOT16_HI_SLO,
9 kx BFD_RELOC_M32R_GOT16_LO,
9 kx BFD_RELOC_M32R_GOTPC_HI_ULO,
9 kx BFD_RELOC_M32R_GOTPC_HI_SLO,
9 kx BFD_RELOC_M32R_GOTPC_LO,
9 kx
9 kx /* NDS32 relocs.
9 kx This is a 20 bit absolute address. */
9 kx BFD_RELOC_NDS32_20,
9 kx
9 kx /* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_9_PCREL,
9 kx
9 kx /* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_WORD_9_PCREL,
9 kx
9 kx /* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_15_PCREL,
9 kx
9 kx /* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_17_PCREL,
9 kx
9 kx /* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_25_PCREL,
9 kx
9 kx /* This is a 20-bit reloc containing the high 20 bits of an address
9 kx used with the lower 12 bits */
9 kx BFD_RELOC_NDS32_HI20,
9 kx
9 kx /* This is a 12-bit reloc containing the lower 12 bits of an address
9 kx then shift right by 3. This is used with ldi,sdi... */
9 kx BFD_RELOC_NDS32_LO12S3,
9 kx
9 kx /* This is a 12-bit reloc containing the lower 12 bits of an address
9 kx then shift left by 2. This is used with lwi,swi... */
9 kx BFD_RELOC_NDS32_LO12S2,
9 kx
9 kx /* This is a 12-bit reloc containing the lower 12 bits of an address
9 kx then shift left by 1. This is used with lhi,shi... */
9 kx BFD_RELOC_NDS32_LO12S1,
9 kx
9 kx /* This is a 12-bit reloc containing the lower 12 bits of an address
9 kx then shift left by 0. This is used with lbisbi... */
9 kx BFD_RELOC_NDS32_LO12S0,
9 kx
9 kx /* This is a 12-bit reloc containing the lower 12 bits of an address
9 kx then shift left by 0. This is only used with branch relaxations */
9 kx BFD_RELOC_NDS32_LO12S0_ORI,
9 kx
9 kx /* This is a 15-bit reloc containing the small data area 18-bit signed offset
9 kx and shift left by 3 for use in ldi, sdi... */
9 kx BFD_RELOC_NDS32_SDA15S3,
9 kx
9 kx /* This is a 15-bit reloc containing the small data area 17-bit signed offset
9 kx and shift left by 2 for use in lwi, swi... */
9 kx BFD_RELOC_NDS32_SDA15S2,
9 kx
9 kx /* This is a 15-bit reloc containing the small data area 16-bit signed offset
9 kx and shift left by 1 for use in lhi, shi... */
9 kx BFD_RELOC_NDS32_SDA15S1,
9 kx
9 kx /* This is a 15-bit reloc containing the small data area 15-bit signed offset
9 kx and shift left by 0 for use in lbi, sbi... */
9 kx BFD_RELOC_NDS32_SDA15S0,
9 kx
9 kx /* This is a 16-bit reloc containing the small data area 16-bit signed offset
9 kx and shift left by 3 */
9 kx BFD_RELOC_NDS32_SDA16S3,
9 kx
9 kx /* This is a 17-bit reloc containing the small data area 17-bit signed offset
9 kx and shift left by 2 for use in lwi.gp, swi.gp... */
9 kx BFD_RELOC_NDS32_SDA17S2,
9 kx
9 kx /* This is a 18-bit reloc containing the small data area 18-bit signed offset
9 kx and shift left by 1 for use in lhi.gp, shi.gp... */
9 kx BFD_RELOC_NDS32_SDA18S1,
9 kx
9 kx /* This is a 19-bit reloc containing the small data area 19-bit signed offset
9 kx and shift left by 0 for use in lbi.gp, sbi.gp... */
9 kx BFD_RELOC_NDS32_SDA19S0,
9 kx
9 kx /* for PIC */
9 kx BFD_RELOC_NDS32_GOT20,
9 kx BFD_RELOC_NDS32_9_PLTREL,
9 kx BFD_RELOC_NDS32_25_PLTREL,
9 kx BFD_RELOC_NDS32_COPY,
9 kx BFD_RELOC_NDS32_GLOB_DAT,
9 kx BFD_RELOC_NDS32_JMP_SLOT,
9 kx BFD_RELOC_NDS32_RELATIVE,
9 kx BFD_RELOC_NDS32_GOTOFF,
9 kx BFD_RELOC_NDS32_GOTOFF_HI20,
9 kx BFD_RELOC_NDS32_GOTOFF_LO12,
9 kx BFD_RELOC_NDS32_GOTPC20,
9 kx BFD_RELOC_NDS32_GOT_HI20,
9 kx BFD_RELOC_NDS32_GOT_LO12,
9 kx BFD_RELOC_NDS32_GOTPC_HI20,
9 kx BFD_RELOC_NDS32_GOTPC_LO12,
9 kx
9 kx /* for relax */
9 kx BFD_RELOC_NDS32_INSN16,
9 kx BFD_RELOC_NDS32_LABEL,
9 kx BFD_RELOC_NDS32_LONGCALL1,
9 kx BFD_RELOC_NDS32_LONGCALL2,
9 kx BFD_RELOC_NDS32_LONGCALL3,
9 kx BFD_RELOC_NDS32_LONGJUMP1,
9 kx BFD_RELOC_NDS32_LONGJUMP2,
9 kx BFD_RELOC_NDS32_LONGJUMP3,
9 kx BFD_RELOC_NDS32_LOADSTORE,
9 kx BFD_RELOC_NDS32_9_FIXED,
9 kx BFD_RELOC_NDS32_15_FIXED,
9 kx BFD_RELOC_NDS32_17_FIXED,
9 kx BFD_RELOC_NDS32_25_FIXED,
9 kx BFD_RELOC_NDS32_LONGCALL4,
9 kx BFD_RELOC_NDS32_LONGCALL5,
9 kx BFD_RELOC_NDS32_LONGCALL6,
9 kx BFD_RELOC_NDS32_LONGJUMP4,
9 kx BFD_RELOC_NDS32_LONGJUMP5,
9 kx BFD_RELOC_NDS32_LONGJUMP6,
9 kx BFD_RELOC_NDS32_LONGJUMP7,
9 kx
9 kx /* for PIC */
9 kx BFD_RELOC_NDS32_PLTREL_HI20,
9 kx BFD_RELOC_NDS32_PLTREL_LO12,
9 kx BFD_RELOC_NDS32_PLT_GOTREL_HI20,
9 kx BFD_RELOC_NDS32_PLT_GOTREL_LO12,
9 kx
9 kx /* for floating point */
9 kx BFD_RELOC_NDS32_SDA12S2_DP,
9 kx BFD_RELOC_NDS32_SDA12S2_SP,
9 kx BFD_RELOC_NDS32_LO12S2_DP,
9 kx BFD_RELOC_NDS32_LO12S2_SP,
9 kx
9 kx /* for dwarf2 debug_line. */
9 kx BFD_RELOC_NDS32_DWARF2_OP1,
9 kx BFD_RELOC_NDS32_DWARF2_OP2,
9 kx BFD_RELOC_NDS32_DWARF2_LEB,
9 kx
9 kx /* for eliminate 16-bit instructions */
9 kx BFD_RELOC_NDS32_UPDATE_TA,
9 kx
9 kx /* for PIC object relaxation */
9 kx BFD_RELOC_NDS32_PLT_GOTREL_LO20,
9 kx BFD_RELOC_NDS32_PLT_GOTREL_LO15,
9 kx BFD_RELOC_NDS32_PLT_GOTREL_LO19,
9 kx BFD_RELOC_NDS32_GOT_LO15,
9 kx BFD_RELOC_NDS32_GOT_LO19,
9 kx BFD_RELOC_NDS32_GOTOFF_LO15,
9 kx BFD_RELOC_NDS32_GOTOFF_LO19,
9 kx BFD_RELOC_NDS32_GOT15S2,
9 kx BFD_RELOC_NDS32_GOT17S2,
9 kx
9 kx /* NDS32 relocs.
9 kx This is a 5 bit absolute address. */
9 kx BFD_RELOC_NDS32_5,
9 kx
9 kx /* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
9 kx BFD_RELOC_NDS32_10_UPCREL,
9 kx
9 kx /* If fp were omitted, fp can used as another gp. */
9 kx BFD_RELOC_NDS32_SDA_FP7U2_RELA,
9 kx
9 kx /* relaxation relative relocation types */
9 kx BFD_RELOC_NDS32_RELAX_ENTRY,
9 kx BFD_RELOC_NDS32_GOT_SUFF,
9 kx BFD_RELOC_NDS32_GOTOFF_SUFF,
9 kx BFD_RELOC_NDS32_PLT_GOT_SUFF,
9 kx BFD_RELOC_NDS32_MULCALL_SUFF,
9 kx BFD_RELOC_NDS32_PTR,
9 kx BFD_RELOC_NDS32_PTR_COUNT,
9 kx BFD_RELOC_NDS32_PTR_RESOLVED,
9 kx BFD_RELOC_NDS32_PLTBLOCK,
9 kx BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
9 kx BFD_RELOC_NDS32_RELAX_REGION_END,
9 kx BFD_RELOC_NDS32_MINUEND,
9 kx BFD_RELOC_NDS32_SUBTRAHEND,
9 kx BFD_RELOC_NDS32_DIFF8,
9 kx BFD_RELOC_NDS32_DIFF16,
9 kx BFD_RELOC_NDS32_DIFF32,
9 kx BFD_RELOC_NDS32_DIFF_ULEB128,
9 kx BFD_RELOC_NDS32_EMPTY,
9 kx
9 kx /* This is a 25 bit absolute address. */
9 kx BFD_RELOC_NDS32_25_ABS,
9 kx
9 kx /* For ex9 and ifc using. */
9 kx BFD_RELOC_NDS32_DATA,
9 kx BFD_RELOC_NDS32_TRAN,
9 kx BFD_RELOC_NDS32_17IFC_PCREL,
9 kx BFD_RELOC_NDS32_10IFCU_PCREL,
9 kx
9 kx /* For TLS. */
9 kx BFD_RELOC_NDS32_TPOFF,
9 kx BFD_RELOC_NDS32_GOTTPOFF,
9 kx BFD_RELOC_NDS32_TLS_LE_HI20,
9 kx BFD_RELOC_NDS32_TLS_LE_LO12,
9 kx BFD_RELOC_NDS32_TLS_LE_20,
9 kx BFD_RELOC_NDS32_TLS_LE_15S0,
9 kx BFD_RELOC_NDS32_TLS_LE_15S1,
9 kx BFD_RELOC_NDS32_TLS_LE_15S2,
9 kx BFD_RELOC_NDS32_TLS_LE_ADD,
9 kx BFD_RELOC_NDS32_TLS_LE_LS,
9 kx BFD_RELOC_NDS32_TLS_IE_HI20,
9 kx BFD_RELOC_NDS32_TLS_IE_LO12,
9 kx BFD_RELOC_NDS32_TLS_IE_LO12S2,
9 kx BFD_RELOC_NDS32_TLS_IEGP_HI20,
9 kx BFD_RELOC_NDS32_TLS_IEGP_LO12,
9 kx BFD_RELOC_NDS32_TLS_IEGP_LO12S2,
9 kx BFD_RELOC_NDS32_TLS_IEGP_LW,
9 kx BFD_RELOC_NDS32_TLS_DESC,
9 kx BFD_RELOC_NDS32_TLS_DESC_HI20,
9 kx BFD_RELOC_NDS32_TLS_DESC_LO12,
9 kx BFD_RELOC_NDS32_TLS_DESC_20,
9 kx BFD_RELOC_NDS32_TLS_DESC_SDA17S2,
9 kx BFD_RELOC_NDS32_TLS_DESC_ADD,
9 kx BFD_RELOC_NDS32_TLS_DESC_FUNC,
9 kx BFD_RELOC_NDS32_TLS_DESC_CALL,
9 kx BFD_RELOC_NDS32_TLS_DESC_MEM,
9 kx BFD_RELOC_NDS32_REMOVE,
9 kx BFD_RELOC_NDS32_GROUP,
9 kx
9 kx /* For floating load store relaxation. */
9 kx BFD_RELOC_NDS32_LSI,
9 kx
9 kx /* This is a 9-bit reloc */
9 kx BFD_RELOC_V850_9_PCREL,
9 kx
9 kx /* This is a 22-bit reloc */
9 kx BFD_RELOC_V850_22_PCREL,
9 kx
9 kx /* This is a 16 bit offset from the short data area pointer. */
9 kx BFD_RELOC_V850_SDA_16_16_OFFSET,
9 kx
9 kx /* This is a 16 bit offset (of which only 15 bits are used) from the
9 kx short data area pointer. */
9 kx BFD_RELOC_V850_SDA_15_16_OFFSET,
9 kx
9 kx /* This is a 16 bit offset from the zero data area pointer. */
9 kx BFD_RELOC_V850_ZDA_16_16_OFFSET,
9 kx
9 kx /* This is a 16 bit offset (of which only 15 bits are used) from the
9 kx zero data area pointer. */
9 kx BFD_RELOC_V850_ZDA_15_16_OFFSET,
9 kx
9 kx /* This is an 8 bit offset (of which only 6 bits are used) from the
9 kx tiny data area pointer. */
9 kx BFD_RELOC_V850_TDA_6_8_OFFSET,
9 kx
9 kx /* This is an 8bit offset (of which only 7 bits are used) from the tiny
9 kx data area pointer. */
9 kx BFD_RELOC_V850_TDA_7_8_OFFSET,
9 kx
9 kx /* This is a 7 bit offset from the tiny data area pointer. */
9 kx BFD_RELOC_V850_TDA_7_7_OFFSET,
9 kx
9 kx /* This is a 16 bit offset from the tiny data area pointer. */
9 kx BFD_RELOC_V850_TDA_16_16_OFFSET,
9 kx
9 kx /* This is a 5 bit offset (of which only 4 bits are used) from the tiny
9 kx data area pointer. */
9 kx BFD_RELOC_V850_TDA_4_5_OFFSET,
9 kx
9 kx /* This is a 4 bit offset from the tiny data area pointer. */
9 kx BFD_RELOC_V850_TDA_4_4_OFFSET,
9 kx
9 kx /* This is a 16 bit offset from the short data area pointer, with the
9 kx bits placed non-contiguously in the instruction. */
9 kx BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
9 kx
9 kx /* This is a 16 bit offset from the zero data area pointer, with the
9 kx bits placed non-contiguously in the instruction. */
9 kx BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
9 kx
9 kx /* This is a 6 bit offset from the call table base pointer. */
9 kx BFD_RELOC_V850_CALLT_6_7_OFFSET,
9 kx
9 kx /* This is a 16 bit offset from the call table base pointer. */
9 kx BFD_RELOC_V850_CALLT_16_16_OFFSET,
9 kx
9 kx /* Used for relaxing indirect function calls. */
9 kx BFD_RELOC_V850_LONGCALL,
9 kx
9 kx /* Used for relaxing indirect jumps. */
9 kx BFD_RELOC_V850_LONGJUMP,
9 kx
9 kx /* Used to maintain alignment whilst relaxing. */
9 kx BFD_RELOC_V850_ALIGN,
9 kx
9 kx /* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
9 kx instructions. */
9 kx BFD_RELOC_V850_LO16_SPLIT_OFFSET,
9 kx
9 kx /* This is a 16-bit reloc. */
9 kx BFD_RELOC_V850_16_PCREL,
9 kx
9 kx /* This is a 17-bit reloc. */
9 kx BFD_RELOC_V850_17_PCREL,
9 kx
9 kx /* This is a 23-bit reloc. */
9 kx BFD_RELOC_V850_23,
9 kx
9 kx /* This is a 32-bit reloc. */
9 kx BFD_RELOC_V850_32_PCREL,
9 kx
9 kx /* This is a 32-bit reloc. */
9 kx BFD_RELOC_V850_32_ABS,
9 kx
9 kx /* This is a 16-bit reloc. */
9 kx BFD_RELOC_V850_16_SPLIT_OFFSET,
9 kx
9 kx /* This is a 16-bit reloc. */
9 kx BFD_RELOC_V850_16_S1,
9 kx
9 kx /* Low 16 bits. 16 bit shifted by 1. */
9 kx BFD_RELOC_V850_LO16_S1,
9 kx
9 kx /* This is a 16 bit offset from the call table base pointer. */
9 kx BFD_RELOC_V850_CALLT_15_16_OFFSET,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_32_GOTPCREL,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_16_GOT,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_32_GOT,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_22_PLT_PCREL,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_32_PLT_PCREL,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_COPY,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_GLOB_DAT,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_JMP_SLOT,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_RELATIVE,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_16_GOTOFF,
9 kx
9 kx /* DSO relocations. */
9 kx BFD_RELOC_V850_32_GOTOFF,
9 kx
9 kx /* start code. */
9 kx BFD_RELOC_V850_CODE,
9 kx
9 kx /* start data in text. */
9 kx BFD_RELOC_V850_DATA,
9 kx
9 kx /* This is a 8bit DP reloc for the tms320c30, where the most
9 kx significant 8 bits of a 24 bit word are placed into the least
9 kx significant 8 bits of the opcode. */
9 kx BFD_RELOC_TIC30_LDP,
9 kx
9 kx /* This is a 7bit reloc for the tms320c54x, where the least
9 kx significant 7 bits of a 16 bit word are placed into the least
9 kx significant 7 bits of the opcode. */
9 kx BFD_RELOC_TIC54X_PARTLS7,
9 kx
9 kx /* This is a 9bit DP reloc for the tms320c54x, where the most
9 kx significant 9 bits of a 16 bit word are placed into the least
9 kx significant 9 bits of the opcode. */
9 kx BFD_RELOC_TIC54X_PARTMS9,
9 kx
9 kx /* This is an extended address 23-bit reloc for the tms320c54x. */
9 kx BFD_RELOC_TIC54X_23,
9 kx
9 kx /* This is a 16-bit reloc for the tms320c54x, where the least
9 kx significant 16 bits of a 23-bit extended address are placed into
9 kx the opcode. */
9 kx BFD_RELOC_TIC54X_16_OF_23,
9 kx
9 kx /* This is a reloc for the tms320c54x, where the most
9 kx significant 7 bits of a 23-bit extended address are placed into
9 kx the opcode. */
9 kx BFD_RELOC_TIC54X_MS7_OF_23,
9 kx
9 kx /* TMS320C6000 relocations. */
9 kx BFD_RELOC_C6000_PCR_S21,
9 kx BFD_RELOC_C6000_PCR_S12,
9 kx BFD_RELOC_C6000_PCR_S10,
9 kx BFD_RELOC_C6000_PCR_S7,
9 kx BFD_RELOC_C6000_ABS_S16,
9 kx BFD_RELOC_C6000_ABS_L16,
9 kx BFD_RELOC_C6000_ABS_H16,
9 kx BFD_RELOC_C6000_SBR_U15_B,
9 kx BFD_RELOC_C6000_SBR_U15_H,
9 kx BFD_RELOC_C6000_SBR_U15_W,
9 kx BFD_RELOC_C6000_SBR_S16,
9 kx BFD_RELOC_C6000_SBR_L16_B,
9 kx BFD_RELOC_C6000_SBR_L16_H,
9 kx BFD_RELOC_C6000_SBR_L16_W,
9 kx BFD_RELOC_C6000_SBR_H16_B,
9 kx BFD_RELOC_C6000_SBR_H16_H,
9 kx BFD_RELOC_C6000_SBR_H16_W,
9 kx BFD_RELOC_C6000_SBR_GOT_U15_W,
9 kx BFD_RELOC_C6000_SBR_GOT_L16_W,
9 kx BFD_RELOC_C6000_SBR_GOT_H16_W,
9 kx BFD_RELOC_C6000_DSBT_INDEX,
9 kx BFD_RELOC_C6000_PREL31,
9 kx BFD_RELOC_C6000_COPY,
9 kx BFD_RELOC_C6000_JUMP_SLOT,
9 kx BFD_RELOC_C6000_EHTYPE,
9 kx BFD_RELOC_C6000_PCR_H16,
9 kx BFD_RELOC_C6000_PCR_L16,
9 kx BFD_RELOC_C6000_ALIGN,
9 kx BFD_RELOC_C6000_FPHEAD,
9 kx BFD_RELOC_C6000_NOCMP,
9 kx
9 kx /* This is a 48 bit reloc for the FR30 that stores 32 bits. */
9 kx BFD_RELOC_FR30_48,
9 kx
9 kx /* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
9 kx two sections. */
9 kx BFD_RELOC_FR30_20,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
9 kx 4 bits. */
9 kx BFD_RELOC_FR30_6_IN_4,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
9 kx into 8 bits. */
9 kx BFD_RELOC_FR30_8_IN_8,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
9 kx into 8 bits. */
9 kx BFD_RELOC_FR30_9_IN_8,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
9 kx into 8 bits. */
9 kx BFD_RELOC_FR30_10_IN_8,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
9 kx short offset into 8 bits. */
9 kx BFD_RELOC_FR30_9_PCREL,
9 kx
9 kx /* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
9 kx short offset into 11 bits. */
9 kx BFD_RELOC_FR30_12_PCREL,
9 kx
9 kx /* Motorola Mcore relocations. */
9 kx BFD_RELOC_MCORE_PCREL_IMM8BY4,
9 kx BFD_RELOC_MCORE_PCREL_IMM11BY2,
9 kx BFD_RELOC_MCORE_PCREL_IMM4BY2,
9 kx BFD_RELOC_MCORE_PCREL_32,
9 kx BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
9 kx BFD_RELOC_MCORE_RVA,
9 kx
9 kx /* Toshiba Media Processor Relocations. */
9 kx BFD_RELOC_MEP_8,
9 kx BFD_RELOC_MEP_16,
9 kx BFD_RELOC_MEP_32,
9 kx BFD_RELOC_MEP_PCREL8A2,
9 kx BFD_RELOC_MEP_PCREL12A2,
9 kx BFD_RELOC_MEP_PCREL17A2,
9 kx BFD_RELOC_MEP_PCREL24A2,
9 kx BFD_RELOC_MEP_PCABS24A2,
9 kx BFD_RELOC_MEP_LOW16,
9 kx BFD_RELOC_MEP_HI16U,
9 kx BFD_RELOC_MEP_HI16S,
9 kx BFD_RELOC_MEP_GPREL,
9 kx BFD_RELOC_MEP_TPREL,
9 kx BFD_RELOC_MEP_TPREL7,
9 kx BFD_RELOC_MEP_TPREL7A2,
9 kx BFD_RELOC_MEP_TPREL7A4,
9 kx BFD_RELOC_MEP_UIMM24,
9 kx BFD_RELOC_MEP_ADDR24A4,
9 kx BFD_RELOC_MEP_GNU_VTINHERIT,
9 kx BFD_RELOC_MEP_GNU_VTENTRY,
9 kx
9 kx
9 kx /* Imagination Technologies Meta relocations. */
9 kx BFD_RELOC_METAG_HIADDR16,
9 kx BFD_RELOC_METAG_LOADDR16,
9 kx BFD_RELOC_METAG_RELBRANCH,
9 kx BFD_RELOC_METAG_GETSETOFF,
9 kx BFD_RELOC_METAG_HIOG,
9 kx BFD_RELOC_METAG_LOOG,
9 kx BFD_RELOC_METAG_REL8,
9 kx BFD_RELOC_METAG_REL16,
9 kx BFD_RELOC_METAG_HI16_GOTOFF,
9 kx BFD_RELOC_METAG_LO16_GOTOFF,
9 kx BFD_RELOC_METAG_GETSET_GOTOFF,
9 kx BFD_RELOC_METAG_GETSET_GOT,
9 kx BFD_RELOC_METAG_HI16_GOTPC,
9 kx BFD_RELOC_METAG_LO16_GOTPC,
9 kx BFD_RELOC_METAG_HI16_PLT,
9 kx BFD_RELOC_METAG_LO16_PLT,
9 kx BFD_RELOC_METAG_RELBRANCH_PLT,
9 kx BFD_RELOC_METAG_GOTOFF,
9 kx BFD_RELOC_METAG_PLT,
9 kx BFD_RELOC_METAG_COPY,
9 kx BFD_RELOC_METAG_JMP_SLOT,
9 kx BFD_RELOC_METAG_RELATIVE,
9 kx BFD_RELOC_METAG_GLOB_DAT,
9 kx BFD_RELOC_METAG_TLS_GD,
9 kx BFD_RELOC_METAG_TLS_LDM,
9 kx BFD_RELOC_METAG_TLS_LDO_HI16,
9 kx BFD_RELOC_METAG_TLS_LDO_LO16,
9 kx BFD_RELOC_METAG_TLS_LDO,
9 kx BFD_RELOC_METAG_TLS_IE,
9 kx BFD_RELOC_METAG_TLS_IENONPIC,
9 kx BFD_RELOC_METAG_TLS_IENONPIC_HI16,
9 kx BFD_RELOC_METAG_TLS_IENONPIC_LO16,
9 kx BFD_RELOC_METAG_TLS_TPOFF,
9 kx BFD_RELOC_METAG_TLS_DTPMOD,
9 kx BFD_RELOC_METAG_TLS_DTPOFF,
9 kx BFD_RELOC_METAG_TLS_LE,
9 kx BFD_RELOC_METAG_TLS_LE_HI16,
9 kx BFD_RELOC_METAG_TLS_LE_LO16,
9 kx
9 kx /* These are relocations for the GETA instruction. */
9 kx BFD_RELOC_MMIX_GETA,
9 kx BFD_RELOC_MMIX_GETA_1,
9 kx BFD_RELOC_MMIX_GETA_2,
9 kx BFD_RELOC_MMIX_GETA_3,
9 kx
9 kx /* These are relocations for a conditional branch instruction. */
9 kx BFD_RELOC_MMIX_CBRANCH,
9 kx BFD_RELOC_MMIX_CBRANCH_J,
9 kx BFD_RELOC_MMIX_CBRANCH_1,
9 kx BFD_RELOC_MMIX_CBRANCH_2,
9 kx BFD_RELOC_MMIX_CBRANCH_3,
9 kx
9 kx /* These are relocations for the PUSHJ instruction. */
9 kx BFD_RELOC_MMIX_PUSHJ,
9 kx BFD_RELOC_MMIX_PUSHJ_1,
9 kx BFD_RELOC_MMIX_PUSHJ_2,
9 kx BFD_RELOC_MMIX_PUSHJ_3,
9 kx BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
9 kx
9 kx /* These are relocations for the JMP instruction. */
9 kx BFD_RELOC_MMIX_JMP,
9 kx BFD_RELOC_MMIX_JMP_1,
9 kx BFD_RELOC_MMIX_JMP_2,
9 kx BFD_RELOC_MMIX_JMP_3,
9 kx
9 kx /* This is a relocation for a relative address as in a GETA instruction or
9 kx a branch. */
9 kx BFD_RELOC_MMIX_ADDR19,
9 kx
9 kx /* This is a relocation for a relative address as in a JMP instruction. */
9 kx BFD_RELOC_MMIX_ADDR27,
9 kx
9 kx /* This is a relocation for an instruction field that may be a general
9 kx register or a value 0..255. */
9 kx BFD_RELOC_MMIX_REG_OR_BYTE,
9 kx
9 kx /* This is a relocation for an instruction field that may be a general
9 kx register. */
9 kx BFD_RELOC_MMIX_REG,
9 kx
9 kx /* This is a relocation for two instruction fields holding a register and
9 kx an offset, the equivalent of the relocation. */
9 kx BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
9 kx
9 kx /* This relocation is an assertion that the expression is not allocated as
9 kx a global register. It does not modify contents. */
9 kx BFD_RELOC_MMIX_LOCAL,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
9 kx short offset into 7 bits. */
9 kx BFD_RELOC_AVR_7_PCREL,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
9 kx short offset into 12 bits. */
9 kx BFD_RELOC_AVR_13_PCREL,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
9 kx program memory address) into 16 bits. */
9 kx BFD_RELOC_AVR_16_PM,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
9 kx data memory address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_LO8_LDI,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
9 kx of data memory address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_HI8_LDI,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
9 kx of program memory address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_HH8_LDI,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
9 kx of 32 bit value) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_MS8_LDI,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (usually data memory address) into 8 bit immediate value of SUBI insn. */
9 kx BFD_RELOC_AVR_LO8_LDI_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (high 8 bit of data memory address) into 8 bit immediate value of
9 kx SUBI insn. */
9 kx BFD_RELOC_AVR_HI8_LDI_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (most high 8 bit of program memory address) into 8 bit immediate value
9 kx of LDI or SUBI insn. */
9 kx BFD_RELOC_AVR_HH8_LDI_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
9 kx of 32 bit value) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_MS8_LDI_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
9 kx command address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_LO8_LDI_PM,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value
9 kx (command address) into 8 bit immediate value of LDI insn. If the address
9 kx is beyond the 128k boundary, the linker inserts a jump stub for this reloc
9 kx in the lower 128k. */
9 kx BFD_RELOC_AVR_LO8_LDI_GS,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
9 kx of command address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_HI8_LDI_PM,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
9 kx of command address) into 8 bit immediate value of LDI insn. If the address
9 kx is beyond the 128k boundary, the linker inserts a jump stub for this reloc
9 kx below 128k. */
9 kx BFD_RELOC_AVR_HI8_LDI_GS,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
9 kx of command address) into 8 bit immediate value of LDI insn. */
9 kx BFD_RELOC_AVR_HH8_LDI_PM,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (usually command address) into 8 bit immediate value of SUBI insn. */
9 kx BFD_RELOC_AVR_LO8_LDI_PM_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (high 8 bit of 16 bit command address) into 8 bit immediate value
9 kx of SUBI insn. */
9 kx BFD_RELOC_AVR_HI8_LDI_PM_NEG,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores negated 8 bit value
9 kx (high 6 bit of 22 bit command address) into 8 bit immediate
9 kx value of SUBI insn. */
9 kx BFD_RELOC_AVR_HH8_LDI_PM_NEG,
9 kx
9 kx /* This is a 32 bit reloc for the AVR that stores 23 bit value
9 kx into 22 bits. */
9 kx BFD_RELOC_AVR_CALL,
9 kx
9 kx /* This is a 16 bit reloc for the AVR that stores all needed bits
9 kx for absolute addressing with ldi with overflow check to linktime */
9 kx BFD_RELOC_AVR_LDI,
9 kx
9 kx /* This is a 6 bit reloc for the AVR that stores offset for ldd/std
9 kx instructions */
9 kx BFD_RELOC_AVR_6,
9 kx
9 kx /* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
9 kx instructions */
9 kx BFD_RELOC_AVR_6_ADIW,
9 kx
9 kx /* This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
9 kx in .byte lo8(symbol) */
9 kx BFD_RELOC_AVR_8_LO,
9 kx
9 kx /* This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
9 kx in .byte hi8(symbol) */
9 kx BFD_RELOC_AVR_8_HI,
9 kx
9 kx /* This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
9 kx in .byte hlo8(symbol) */
9 kx BFD_RELOC_AVR_8_HLO,
9 kx
9 kx /* AVR relocations to mark the difference of two local symbols.
9 kx These are only needed to support linker relaxation and can be ignored
9 kx when not relaxing. The field is set to the value of the difference
9 kx assuming no relaxation. The relocation encodes the position of the
9 kx second symbol so the linker can determine whether to adjust the field
9 kx value. */
9 kx BFD_RELOC_AVR_DIFF8,
9 kx BFD_RELOC_AVR_DIFF16,
9 kx BFD_RELOC_AVR_DIFF32,
9 kx
9 kx /* This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
9 kx lds and sts instructions supported only tiny core. */
9 kx BFD_RELOC_AVR_LDS_STS_16,
9 kx
9 kx /* This is a 6 bit reloc for the AVR that stores an I/O register
9 kx number for the IN and OUT instructions */
9 kx BFD_RELOC_AVR_PORT6,
9 kx
9 kx /* This is a 5 bit reloc for the AVR that stores an I/O register
9 kx number for the SBIC, SBIS, SBI and CBI instructions */
9 kx BFD_RELOC_AVR_PORT5,
9 kx
9 kx /* RISC-V relocations. */
9 kx BFD_RELOC_RISCV_HI20,
9 kx BFD_RELOC_RISCV_PCREL_HI20,
9 kx BFD_RELOC_RISCV_PCREL_LO12_I,
9 kx BFD_RELOC_RISCV_PCREL_LO12_S,
9 kx BFD_RELOC_RISCV_LO12_I,
9 kx BFD_RELOC_RISCV_LO12_S,
9 kx BFD_RELOC_RISCV_GPREL12_I,
9 kx BFD_RELOC_RISCV_GPREL12_S,
9 kx BFD_RELOC_RISCV_TPREL_HI20,
9 kx BFD_RELOC_RISCV_TPREL_LO12_I,
9 kx BFD_RELOC_RISCV_TPREL_LO12_S,
9 kx BFD_RELOC_RISCV_TPREL_ADD,
9 kx BFD_RELOC_RISCV_CALL,
9 kx BFD_RELOC_RISCV_CALL_PLT,
9 kx BFD_RELOC_RISCV_ADD8,
9 kx BFD_RELOC_RISCV_ADD16,
9 kx BFD_RELOC_RISCV_ADD32,
9 kx BFD_RELOC_RISCV_ADD64,
9 kx BFD_RELOC_RISCV_SUB8,
9 kx BFD_RELOC_RISCV_SUB16,
9 kx BFD_RELOC_RISCV_SUB32,
9 kx BFD_RELOC_RISCV_SUB64,
9 kx BFD_RELOC_RISCV_GOT_HI20,
9 kx BFD_RELOC_RISCV_TLS_GOT_HI20,
9 kx BFD_RELOC_RISCV_TLS_GD_HI20,
9 kx BFD_RELOC_RISCV_JMP,
9 kx BFD_RELOC_RISCV_TLS_DTPMOD32,
9 kx BFD_RELOC_RISCV_TLS_DTPREL32,
9 kx BFD_RELOC_RISCV_TLS_DTPMOD64,
9 kx BFD_RELOC_RISCV_TLS_DTPREL64,
9 kx BFD_RELOC_RISCV_TLS_TPREL32,
9 kx BFD_RELOC_RISCV_TLS_TPREL64,
9 kx BFD_RELOC_RISCV_ALIGN,
9 kx BFD_RELOC_RISCV_RVC_BRANCH,
9 kx BFD_RELOC_RISCV_RVC_JUMP,
9 kx BFD_RELOC_RISCV_RVC_LUI,
9 kx BFD_RELOC_RISCV_GPREL_I,
9 kx BFD_RELOC_RISCV_GPREL_S,
9 kx BFD_RELOC_RISCV_TPREL_I,
9 kx BFD_RELOC_RISCV_TPREL_S,
9 kx BFD_RELOC_RISCV_RELAX,
9 kx BFD_RELOC_RISCV_CFA,
9 kx BFD_RELOC_RISCV_SUB6,
9 kx BFD_RELOC_RISCV_SET6,
9 kx BFD_RELOC_RISCV_SET8,
9 kx BFD_RELOC_RISCV_SET16,
9 kx BFD_RELOC_RISCV_SET32,
9 kx BFD_RELOC_RISCV_32_PCREL,
9 kx
9 kx /* Renesas RL78 Relocations. */
9 kx BFD_RELOC_RL78_NEG8,
9 kx BFD_RELOC_RL78_NEG16,
9 kx BFD_RELOC_RL78_NEG24,
9 kx BFD_RELOC_RL78_NEG32,
9 kx BFD_RELOC_RL78_16_OP,
9 kx BFD_RELOC_RL78_24_OP,
9 kx BFD_RELOC_RL78_32_OP,
9 kx BFD_RELOC_RL78_8U,
9 kx BFD_RELOC_RL78_16U,
9 kx BFD_RELOC_RL78_24U,
9 kx BFD_RELOC_RL78_DIR3U_PCREL,
9 kx BFD_RELOC_RL78_DIFF,
9 kx BFD_RELOC_RL78_GPRELB,
9 kx BFD_RELOC_RL78_GPRELW,
9 kx BFD_RELOC_RL78_GPRELL,
9 kx BFD_RELOC_RL78_SYM,
9 kx BFD_RELOC_RL78_OP_SUBTRACT,
9 kx BFD_RELOC_RL78_OP_NEG,
9 kx BFD_RELOC_RL78_OP_AND,
9 kx BFD_RELOC_RL78_OP_SHRA,
9 kx BFD_RELOC_RL78_ABS8,
9 kx BFD_RELOC_RL78_ABS16,
9 kx BFD_RELOC_RL78_ABS16_REV,
9 kx BFD_RELOC_RL78_ABS32,
9 kx BFD_RELOC_RL78_ABS32_REV,
9 kx BFD_RELOC_RL78_ABS16U,
9 kx BFD_RELOC_RL78_ABS16UW,
9 kx BFD_RELOC_RL78_ABS16UL,
9 kx BFD_RELOC_RL78_RELAX,
9 kx BFD_RELOC_RL78_HI16,
9 kx BFD_RELOC_RL78_HI8,
9 kx BFD_RELOC_RL78_LO16,
9 kx BFD_RELOC_RL78_CODE,
9 kx BFD_RELOC_RL78_SADDR,
9 kx
9 kx /* Renesas RX Relocations. */
9 kx BFD_RELOC_RX_NEG8,
9 kx BFD_RELOC_RX_NEG16,
9 kx BFD_RELOC_RX_NEG24,
9 kx BFD_RELOC_RX_NEG32,
9 kx BFD_RELOC_RX_16_OP,
9 kx BFD_RELOC_RX_24_OP,
9 kx BFD_RELOC_RX_32_OP,
9 kx BFD_RELOC_RX_8U,
9 kx BFD_RELOC_RX_16U,
9 kx BFD_RELOC_RX_24U,
9 kx BFD_RELOC_RX_DIR3U_PCREL,
9 kx BFD_RELOC_RX_DIFF,
9 kx BFD_RELOC_RX_GPRELB,
9 kx BFD_RELOC_RX_GPRELW,
9 kx BFD_RELOC_RX_GPRELL,
9 kx BFD_RELOC_RX_SYM,
9 kx BFD_RELOC_RX_OP_SUBTRACT,
9 kx BFD_RELOC_RX_OP_NEG,
9 kx BFD_RELOC_RX_ABS8,
9 kx BFD_RELOC_RX_ABS16,
9 kx BFD_RELOC_RX_ABS16_REV,
9 kx BFD_RELOC_RX_ABS32,
9 kx BFD_RELOC_RX_ABS32_REV,
9 kx BFD_RELOC_RX_ABS16U,
9 kx BFD_RELOC_RX_ABS16UW,
9 kx BFD_RELOC_RX_ABS16UL,
9 kx BFD_RELOC_RX_RELAX,
9 kx
9 kx /* Direct 12 bit. */
9 kx BFD_RELOC_390_12,
9 kx
9 kx /* 12 bit GOT offset. */
9 kx BFD_RELOC_390_GOT12,
9 kx
9 kx /* 32 bit PC relative PLT address. */
9 kx BFD_RELOC_390_PLT32,
9 kx
9 kx /* Copy symbol at runtime. */
9 kx BFD_RELOC_390_COPY,
9 kx
9 kx /* Create GOT entry. */
9 kx BFD_RELOC_390_GLOB_DAT,
9 kx
9 kx /* Create PLT entry. */
9 kx BFD_RELOC_390_JMP_SLOT,
9 kx
9 kx /* Adjust by program base. */
9 kx BFD_RELOC_390_RELATIVE,
9 kx
9 kx /* 32 bit PC relative offset to GOT. */
9 kx BFD_RELOC_390_GOTPC,
9 kx
9 kx /* 16 bit GOT offset. */
9 kx BFD_RELOC_390_GOT16,
9 kx
9 kx /* PC relative 12 bit shifted by 1. */
9 kx BFD_RELOC_390_PC12DBL,
9 kx
9 kx /* 12 bit PC rel. PLT shifted by 1. */
9 kx BFD_RELOC_390_PLT12DBL,
9 kx
9 kx /* PC relative 16 bit shifted by 1. */
9 kx BFD_RELOC_390_PC16DBL,
9 kx
9 kx /* 16 bit PC rel. PLT shifted by 1. */
9 kx BFD_RELOC_390_PLT16DBL,
9 kx
9 kx /* PC relative 24 bit shifted by 1. */
9 kx BFD_RELOC_390_PC24DBL,
9 kx
9 kx /* 24 bit PC rel. PLT shifted by 1. */
9 kx BFD_RELOC_390_PLT24DBL,
9 kx
9 kx /* PC relative 32 bit shifted by 1. */
9 kx BFD_RELOC_390_PC32DBL,
9 kx
9 kx /* 32 bit PC rel. PLT shifted by 1. */
9 kx BFD_RELOC_390_PLT32DBL,
9 kx
9 kx /* 32 bit PC rel. GOT shifted by 1. */
9 kx BFD_RELOC_390_GOTPCDBL,
9 kx
9 kx /* 64 bit GOT offset. */
9 kx BFD_RELOC_390_GOT64,
9 kx
9 kx /* 64 bit PC relative PLT address. */
9 kx BFD_RELOC_390_PLT64,
9 kx
9 kx /* 32 bit rel. offset to GOT entry. */
9 kx BFD_RELOC_390_GOTENT,
9 kx
9 kx /* 64 bit offset to GOT. */
9 kx BFD_RELOC_390_GOTOFF64,
9 kx
9 kx /* 12-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_390_GOTPLT12,
9 kx
9 kx /* 16-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_390_GOTPLT16,
9 kx
9 kx /* 32-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_390_GOTPLT32,
9 kx
9 kx /* 64-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_390_GOTPLT64,
9 kx
9 kx /* 32-bit rel. offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_390_GOTPLTENT,
9 kx
9 kx /* 16-bit rel. offset from the GOT to a PLT entry. */
9 kx BFD_RELOC_390_PLTOFF16,
9 kx
9 kx /* 32-bit rel. offset from the GOT to a PLT entry. */
9 kx BFD_RELOC_390_PLTOFF32,
9 kx
9 kx /* 64-bit rel. offset from the GOT to a PLT entry. */
9 kx BFD_RELOC_390_PLTOFF64,
9 kx
9 kx /* s390 tls relocations. */
9 kx BFD_RELOC_390_TLS_LOAD,
9 kx BFD_RELOC_390_TLS_GDCALL,
9 kx BFD_RELOC_390_TLS_LDCALL,
9 kx BFD_RELOC_390_TLS_GD32,
9 kx BFD_RELOC_390_TLS_GD64,
9 kx BFD_RELOC_390_TLS_GOTIE12,
9 kx BFD_RELOC_390_TLS_GOTIE32,
9 kx BFD_RELOC_390_TLS_GOTIE64,
9 kx BFD_RELOC_390_TLS_LDM32,
9 kx BFD_RELOC_390_TLS_LDM64,
9 kx BFD_RELOC_390_TLS_IE32,
9 kx BFD_RELOC_390_TLS_IE64,
9 kx BFD_RELOC_390_TLS_IEENT,
9 kx BFD_RELOC_390_TLS_LE32,
9 kx BFD_RELOC_390_TLS_LE64,
9 kx BFD_RELOC_390_TLS_LDO32,
9 kx BFD_RELOC_390_TLS_LDO64,
9 kx BFD_RELOC_390_TLS_DTPMOD,
9 kx BFD_RELOC_390_TLS_DTPOFF,
9 kx BFD_RELOC_390_TLS_TPOFF,
9 kx
9 kx /* Long displacement extension. */
9 kx BFD_RELOC_390_20,
9 kx BFD_RELOC_390_GOT20,
9 kx BFD_RELOC_390_GOTPLT20,
9 kx BFD_RELOC_390_TLS_GOTIE20,
9 kx
9 kx /* STT_GNU_IFUNC relocation. */
9 kx BFD_RELOC_390_IRELATIVE,
9 kx
9 kx /* Score relocations
9 kx Low 16 bit for load/store */
9 kx BFD_RELOC_SCORE_GPREL15,
9 kx
9 kx /* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
9 kx BFD_RELOC_SCORE_DUMMY2,
9 kx BFD_RELOC_SCORE_JMP,
9 kx
9 kx /* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
9 kx BFD_RELOC_SCORE_BRANCH,
9 kx
9 kx /* This is a 32-bit reloc for 48-bit instructions. */
9 kx BFD_RELOC_SCORE_IMM30,
9 kx
9 kx /* This is a 32-bit reloc for 48-bit instructions. */
9 kx BFD_RELOC_SCORE_IMM32,
9 kx
9 kx /* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
9 kx BFD_RELOC_SCORE16_JMP,
9 kx
9 kx /* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
9 kx BFD_RELOC_SCORE16_BRANCH,
9 kx
9 kx /* This is a 9-bit reloc with the right 1 bit assumed to be 0 */
9 kx BFD_RELOC_SCORE_BCMP,
9 kx
9 kx /* Undocumented Score relocs */
9 kx BFD_RELOC_SCORE_GOT15,
9 kx BFD_RELOC_SCORE_GOT_LO16,
9 kx BFD_RELOC_SCORE_CALL15,
9 kx BFD_RELOC_SCORE_DUMMY_HI16,
9 kx
9 kx /* Scenix IP2K - 9-bit register number / data address */
9 kx BFD_RELOC_IP2K_FR9,
9 kx
9 kx /* Scenix IP2K - 4-bit register/data bank number */
9 kx BFD_RELOC_IP2K_BANK,
9 kx
9 kx /* Scenix IP2K - low 13 bits of instruction word address */
9 kx BFD_RELOC_IP2K_ADDR16CJP,
9 kx
9 kx /* Scenix IP2K - high 3 bits of instruction word address */
9 kx BFD_RELOC_IP2K_PAGE3,
9 kx
9 kx /* Scenix IP2K - ext/low/high 8 bits of data address */
9 kx BFD_RELOC_IP2K_LO8DATA,
9 kx BFD_RELOC_IP2K_HI8DATA,
9 kx BFD_RELOC_IP2K_EX8DATA,
9 kx
9 kx /* Scenix IP2K - low/high 8 bits of instruction word address */
9 kx BFD_RELOC_IP2K_LO8INSN,
9 kx BFD_RELOC_IP2K_HI8INSN,
9 kx
9 kx /* Scenix IP2K - even/odd PC modifier to modify snb pcl.0 */
9 kx BFD_RELOC_IP2K_PC_SKIP,
9 kx
9 kx /* Scenix IP2K - 16 bit word address in text section. */
9 kx BFD_RELOC_IP2K_TEXT,
9 kx
9 kx /* Scenix IP2K - 7-bit sp or dp offset */
9 kx BFD_RELOC_IP2K_FR_OFFSET,
9 kx
9 kx /* Scenix VPE4K coprocessor - data/insn-space addressing */
9 kx BFD_RELOC_VPE4KMATH_DATA,
9 kx BFD_RELOC_VPE4KMATH_INSN,
9 kx
9 kx /* These two relocations are used by the linker to determine which of
9 kx the entries in a C++ virtual function table are actually used. When
9 kx the --gc-sections option is given, the linker will zero out the entries
9 kx that are not used, so that the code for those functions need not be
9 kx included in the output.
9 kx
9 kx VTABLE_INHERIT is a zero-space relocation used to describe to the
9 kx linker the inheritance tree of a C++ virtual function table. The
9 kx relocation's symbol should be the parent class' vtable, and the
9 kx relocation should be located at the child vtable.
9 kx
9 kx VTABLE_ENTRY is a zero-space relocation that describes the use of a
9 kx virtual function table entry. The reloc's symbol should refer to the
9 kx table of the class mentioned in the code. Off of that base, an offset
9 kx describes the entry that is being used. For Rela hosts, this offset
9 kx is stored in the reloc's addend. For Rel hosts, we are forced to put
9 kx this offset in the reloc's section offset. */
9 kx BFD_RELOC_VTABLE_INHERIT,
9 kx BFD_RELOC_VTABLE_ENTRY,
9 kx
9 kx /* Intel IA64 Relocations. */
9 kx BFD_RELOC_IA64_IMM14,
9 kx BFD_RELOC_IA64_IMM22,
9 kx BFD_RELOC_IA64_IMM64,
9 kx BFD_RELOC_IA64_DIR32MSB,
9 kx BFD_RELOC_IA64_DIR32LSB,
9 kx BFD_RELOC_IA64_DIR64MSB,
9 kx BFD_RELOC_IA64_DIR64LSB,
9 kx BFD_RELOC_IA64_GPREL22,
9 kx BFD_RELOC_IA64_GPREL64I,
9 kx BFD_RELOC_IA64_GPREL32MSB,
9 kx BFD_RELOC_IA64_GPREL32LSB,
9 kx BFD_RELOC_IA64_GPREL64MSB,
9 kx BFD_RELOC_IA64_GPREL64LSB,
9 kx BFD_RELOC_IA64_LTOFF22,
9 kx BFD_RELOC_IA64_LTOFF64I,
9 kx BFD_RELOC_IA64_PLTOFF22,
9 kx BFD_RELOC_IA64_PLTOFF64I,
9 kx BFD_RELOC_IA64_PLTOFF64MSB,
9 kx BFD_RELOC_IA64_PLTOFF64LSB,
9 kx BFD_RELOC_IA64_FPTR64I,
9 kx BFD_RELOC_IA64_FPTR32MSB,
9 kx BFD_RELOC_IA64_FPTR32LSB,
9 kx BFD_RELOC_IA64_FPTR64MSB,
9 kx BFD_RELOC_IA64_FPTR64LSB,
9 kx BFD_RELOC_IA64_PCREL21B,
9 kx BFD_RELOC_IA64_PCREL21BI,
9 kx BFD_RELOC_IA64_PCREL21M,
9 kx BFD_RELOC_IA64_PCREL21F,
9 kx BFD_RELOC_IA64_PCREL22,
9 kx BFD_RELOC_IA64_PCREL60B,
9 kx BFD_RELOC_IA64_PCREL64I,
9 kx BFD_RELOC_IA64_PCREL32MSB,
9 kx BFD_RELOC_IA64_PCREL32LSB,
9 kx BFD_RELOC_IA64_PCREL64MSB,
9 kx BFD_RELOC_IA64_PCREL64LSB,
9 kx BFD_RELOC_IA64_LTOFF_FPTR22,
9 kx BFD_RELOC_IA64_LTOFF_FPTR64I,
9 kx BFD_RELOC_IA64_LTOFF_FPTR32MSB,
9 kx BFD_RELOC_IA64_LTOFF_FPTR32LSB,
9 kx BFD_RELOC_IA64_LTOFF_FPTR64MSB,
9 kx BFD_RELOC_IA64_LTOFF_FPTR64LSB,
9 kx BFD_RELOC_IA64_SEGREL32MSB,
9 kx BFD_RELOC_IA64_SEGREL32LSB,
9 kx BFD_RELOC_IA64_SEGREL64MSB,
9 kx BFD_RELOC_IA64_SEGREL64LSB,
9 kx BFD_RELOC_IA64_SECREL32MSB,
9 kx BFD_RELOC_IA64_SECREL32LSB,
9 kx BFD_RELOC_IA64_SECREL64MSB,
9 kx BFD_RELOC_IA64_SECREL64LSB,
9 kx BFD_RELOC_IA64_REL32MSB,
9 kx BFD_RELOC_IA64_REL32LSB,
9 kx BFD_RELOC_IA64_REL64MSB,
9 kx BFD_RELOC_IA64_REL64LSB,
9 kx BFD_RELOC_IA64_LTV32MSB,
9 kx BFD_RELOC_IA64_LTV32LSB,
9 kx BFD_RELOC_IA64_LTV64MSB,
9 kx BFD_RELOC_IA64_LTV64LSB,
9 kx BFD_RELOC_IA64_IPLTMSB,
9 kx BFD_RELOC_IA64_IPLTLSB,
9 kx BFD_RELOC_IA64_COPY,
9 kx BFD_RELOC_IA64_LTOFF22X,
9 kx BFD_RELOC_IA64_LDXMOV,
9 kx BFD_RELOC_IA64_TPREL14,
9 kx BFD_RELOC_IA64_TPREL22,
9 kx BFD_RELOC_IA64_TPREL64I,
9 kx BFD_RELOC_IA64_TPREL64MSB,
9 kx BFD_RELOC_IA64_TPREL64LSB,
9 kx BFD_RELOC_IA64_LTOFF_TPREL22,
9 kx BFD_RELOC_IA64_DTPMOD64MSB,
9 kx BFD_RELOC_IA64_DTPMOD64LSB,
9 kx BFD_RELOC_IA64_LTOFF_DTPMOD22,
9 kx BFD_RELOC_IA64_DTPREL14,
9 kx BFD_RELOC_IA64_DTPREL22,
9 kx BFD_RELOC_IA64_DTPREL64I,
9 kx BFD_RELOC_IA64_DTPREL32MSB,
9 kx BFD_RELOC_IA64_DTPREL32LSB,
9 kx BFD_RELOC_IA64_DTPREL64MSB,
9 kx BFD_RELOC_IA64_DTPREL64LSB,
9 kx BFD_RELOC_IA64_LTOFF_DTPREL22,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is the 8 bit high part of an absolute address. */
9 kx BFD_RELOC_M68HC11_HI8,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is the 8 bit low part of an absolute address. */
9 kx BFD_RELOC_M68HC11_LO8,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is the 3 bit of a value. */
9 kx BFD_RELOC_M68HC11_3B,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This reloc marks the beginning of a jump/call instruction.
9 kx It is used for linker relaxation to correctly identify beginning
9 kx of instruction and change some branches to use PC-relative
9 kx addressing mode. */
9 kx BFD_RELOC_M68HC11_RL_JUMP,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This reloc marks a group of several instructions that gcc generates
9 kx and for which the linker relaxation pass can modify and/or remove
9 kx some of them. */
9 kx BFD_RELOC_M68HC11_RL_GROUP,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is the 16-bit lower part of an address. It is used for 'call'
9 kx instruction to specify the symbol address without any special
9 kx transformation (due to memory bank window). */
9 kx BFD_RELOC_M68HC11_LO16,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is a 8-bit reloc that specifies the page number of an address.
9 kx It is used by 'call' instruction to specify the page number of
9 kx the symbol. */
9 kx BFD_RELOC_M68HC11_PAGE,
9 kx
9 kx /* Motorola 68HC11 reloc.
9 kx This is a 24-bit reloc that represents the address with a 16-bit
9 kx value and a 8-bit page number. The symbol address is transformed
9 kx to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
9 kx BFD_RELOC_M68HC11_24,
9 kx
9 kx /* Motorola 68HC12 reloc.
9 kx This is the 5 bits of a value. */
9 kx BFD_RELOC_M68HC12_5B,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This reloc marks the beginning of a bra/jal instruction. */
9 kx BFD_RELOC_XGATE_RL_JUMP,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This reloc marks a group of several instructions that gcc generates
9 kx and for which the linker relaxation pass can modify and/or remove
9 kx some of them. */
9 kx BFD_RELOC_XGATE_RL_GROUP,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is the 16-bit lower part of an address. It is used for the '16-bit'
9 kx instructions. */
9 kx BFD_RELOC_XGATE_LO16,
9 kx
9 kx /* Freescale XGATE reloc. */
9 kx BFD_RELOC_XGATE_GPAGE,
9 kx
9 kx /* Freescale XGATE reloc. */
9 kx BFD_RELOC_XGATE_24,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is a 9-bit pc-relative reloc. */
9 kx BFD_RELOC_XGATE_PCREL_9,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is a 10-bit pc-relative reloc. */
9 kx BFD_RELOC_XGATE_PCREL_10,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is the 16-bit lower part of an address. It is used for the '16-bit'
9 kx instructions. */
9 kx BFD_RELOC_XGATE_IMM8_LO,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is the 16-bit higher part of an address. It is used for the '16-bit'
9 kx instructions. */
9 kx BFD_RELOC_XGATE_IMM8_HI,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is a 3-bit pc-relative reloc. */
9 kx BFD_RELOC_XGATE_IMM3,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is a 4-bit pc-relative reloc. */
9 kx BFD_RELOC_XGATE_IMM4,
9 kx
9 kx /* Freescale XGATE reloc.
9 kx This is a 5-bit pc-relative reloc. */
9 kx BFD_RELOC_XGATE_IMM5,
9 kx
9 kx /* Motorola 68HC12 reloc.
9 kx This is the 9 bits of a value. */
9 kx BFD_RELOC_M68HC12_9B,
9 kx
9 kx /* Motorola 68HC12 reloc.
9 kx This is the 16 bits of a value. */
9 kx BFD_RELOC_M68HC12_16B,
9 kx
9 kx /* Motorola 68HC12/XGATE reloc.
9 kx This is a PCREL9 branch. */
9 kx BFD_RELOC_M68HC12_9_PCREL,
9 kx
9 kx /* Motorola 68HC12/XGATE reloc.
9 kx This is a PCREL10 branch. */
9 kx BFD_RELOC_M68HC12_10_PCREL,
9 kx
9 kx /* Motorola 68HC12/XGATE reloc.
9 kx This is the 8 bit low part of an absolute address and immediately precedes
9 kx a matching HI8XG part. */
9 kx BFD_RELOC_M68HC12_LO8XG,
9 kx
9 kx /* Motorola 68HC12/XGATE reloc.
9 kx This is the 8 bit high part of an absolute address and immediately follows
9 kx a matching LO8XG part. */
9 kx BFD_RELOC_M68HC12_HI8XG,
9 kx
9 kx /* Freescale S12Z reloc.
9 kx This is a 15 bit relative address. If the most significant bits are all zero
9 kx then it may be truncated to 8 bits. */
9 kx BFD_RELOC_S12Z_15_PCREL,
9 kx
9 kx /* NS CR16 Relocations. */
9 kx BFD_RELOC_CR16_NUM8,
9 kx BFD_RELOC_CR16_NUM16,
9 kx BFD_RELOC_CR16_NUM32,
9 kx BFD_RELOC_CR16_NUM32a,
9 kx BFD_RELOC_CR16_REGREL0,
9 kx BFD_RELOC_CR16_REGREL4,
9 kx BFD_RELOC_CR16_REGREL4a,
9 kx BFD_RELOC_CR16_REGREL14,
9 kx BFD_RELOC_CR16_REGREL14a,
9 kx BFD_RELOC_CR16_REGREL16,
9 kx BFD_RELOC_CR16_REGREL20,
9 kx BFD_RELOC_CR16_REGREL20a,
9 kx BFD_RELOC_CR16_ABS20,
9 kx BFD_RELOC_CR16_ABS24,
9 kx BFD_RELOC_CR16_IMM4,
9 kx BFD_RELOC_CR16_IMM8,
9 kx BFD_RELOC_CR16_IMM16,
9 kx BFD_RELOC_CR16_IMM20,
9 kx BFD_RELOC_CR16_IMM24,
9 kx BFD_RELOC_CR16_IMM32,
9 kx BFD_RELOC_CR16_IMM32a,
9 kx BFD_RELOC_CR16_DISP4,
9 kx BFD_RELOC_CR16_DISP8,
9 kx BFD_RELOC_CR16_DISP16,
9 kx BFD_RELOC_CR16_DISP20,
9 kx BFD_RELOC_CR16_DISP24,
9 kx BFD_RELOC_CR16_DISP24a,
9 kx BFD_RELOC_CR16_SWITCH8,
9 kx BFD_RELOC_CR16_SWITCH16,
9 kx BFD_RELOC_CR16_SWITCH32,
9 kx BFD_RELOC_CR16_GOT_REGREL20,
9 kx BFD_RELOC_CR16_GOTC_REGREL20,
9 kx BFD_RELOC_CR16_GLOB_DAT,
9 kx
9 kx /* NS CRX Relocations. */
9 kx BFD_RELOC_CRX_REL4,
9 kx BFD_RELOC_CRX_REL8,
9 kx BFD_RELOC_CRX_REL8_CMP,
9 kx BFD_RELOC_CRX_REL16,
9 kx BFD_RELOC_CRX_REL24,
9 kx BFD_RELOC_CRX_REL32,
9 kx BFD_RELOC_CRX_REGREL12,
9 kx BFD_RELOC_CRX_REGREL22,
9 kx BFD_RELOC_CRX_REGREL28,
9 kx BFD_RELOC_CRX_REGREL32,
9 kx BFD_RELOC_CRX_ABS16,
9 kx BFD_RELOC_CRX_ABS32,
9 kx BFD_RELOC_CRX_NUM8,
9 kx BFD_RELOC_CRX_NUM16,
9 kx BFD_RELOC_CRX_NUM32,
9 kx BFD_RELOC_CRX_IMM16,
9 kx BFD_RELOC_CRX_IMM32,
9 kx BFD_RELOC_CRX_SWITCH8,
9 kx BFD_RELOC_CRX_SWITCH16,
9 kx BFD_RELOC_CRX_SWITCH32,
9 kx
9 kx /* These relocs are only used within the CRIS assembler. They are not
9 kx (at present) written to any object files. */
9 kx BFD_RELOC_CRIS_BDISP8,
9 kx BFD_RELOC_CRIS_UNSIGNED_5,
9 kx BFD_RELOC_CRIS_SIGNED_6,
9 kx BFD_RELOC_CRIS_UNSIGNED_6,
9 kx BFD_RELOC_CRIS_SIGNED_8,
9 kx BFD_RELOC_CRIS_UNSIGNED_8,
9 kx BFD_RELOC_CRIS_SIGNED_16,
9 kx BFD_RELOC_CRIS_UNSIGNED_16,
9 kx BFD_RELOC_CRIS_LAPCQ_OFFSET,
9 kx BFD_RELOC_CRIS_UNSIGNED_4,
9 kx
9 kx /* Relocs used in ELF shared libraries for CRIS. */
9 kx BFD_RELOC_CRIS_COPY,
9 kx BFD_RELOC_CRIS_GLOB_DAT,
9 kx BFD_RELOC_CRIS_JUMP_SLOT,
9 kx BFD_RELOC_CRIS_RELATIVE,
9 kx
9 kx /* 32-bit offset to symbol-entry within GOT. */
9 kx BFD_RELOC_CRIS_32_GOT,
9 kx
9 kx /* 16-bit offset to symbol-entry within GOT. */
9 kx BFD_RELOC_CRIS_16_GOT,
9 kx
9 kx /* 32-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_CRIS_32_GOTPLT,
9 kx
9 kx /* 16-bit offset to symbol-entry within GOT, with PLT handling. */
9 kx BFD_RELOC_CRIS_16_GOTPLT,
9 kx
9 kx /* 32-bit offset to symbol, relative to GOT. */
9 kx BFD_RELOC_CRIS_32_GOTREL,
9 kx
9 kx /* 32-bit offset to symbol with PLT entry, relative to GOT. */
9 kx BFD_RELOC_CRIS_32_PLT_GOTREL,
9 kx
9 kx /* 32-bit offset to symbol with PLT entry, relative to this relocation. */
9 kx BFD_RELOC_CRIS_32_PLT_PCREL,
9 kx
9 kx /* Relocs used in TLS code for CRIS. */
9 kx BFD_RELOC_CRIS_32_GOT_GD,
9 kx BFD_RELOC_CRIS_16_GOT_GD,
9 kx BFD_RELOC_CRIS_32_GD,
9 kx BFD_RELOC_CRIS_DTP,
9 kx BFD_RELOC_CRIS_32_DTPREL,
9 kx BFD_RELOC_CRIS_16_DTPREL,
9 kx BFD_RELOC_CRIS_32_GOT_TPREL,
9 kx BFD_RELOC_CRIS_16_GOT_TPREL,
9 kx BFD_RELOC_CRIS_32_TPREL,
9 kx BFD_RELOC_CRIS_16_TPREL,
9 kx BFD_RELOC_CRIS_DTPMOD,
9 kx BFD_RELOC_CRIS_32_IE,
9 kx
9 kx /* OpenRISC 1000 Relocations. */
9 kx BFD_RELOC_OR1K_REL_26,
9 kx BFD_RELOC_OR1K_SLO16,
9 kx BFD_RELOC_OR1K_PCREL_PG21,
9 kx BFD_RELOC_OR1K_LO13,
9 kx BFD_RELOC_OR1K_SLO13,
9 kx BFD_RELOC_OR1K_GOTPC_HI16,
9 kx BFD_RELOC_OR1K_GOTPC_LO16,
9 kx BFD_RELOC_OR1K_GOT_AHI16,
9 kx BFD_RELOC_OR1K_GOT16,
9 kx BFD_RELOC_OR1K_GOT_PG21,
9 kx BFD_RELOC_OR1K_GOT_LO13,
9 kx BFD_RELOC_OR1K_PLT26,
9 kx BFD_RELOC_OR1K_PLTA26,
9 kx BFD_RELOC_OR1K_GOTOFF_SLO16,
9 kx BFD_RELOC_OR1K_COPY,
9 kx BFD_RELOC_OR1K_GLOB_DAT,
9 kx BFD_RELOC_OR1K_JMP_SLOT,
9 kx BFD_RELOC_OR1K_RELATIVE,
9 kx BFD_RELOC_OR1K_TLS_GD_HI16,
9 kx BFD_RELOC_OR1K_TLS_GD_LO16,
9 kx BFD_RELOC_OR1K_TLS_GD_PG21,
9 kx BFD_RELOC_OR1K_TLS_GD_LO13,
9 kx BFD_RELOC_OR1K_TLS_LDM_HI16,
9 kx BFD_RELOC_OR1K_TLS_LDM_LO16,
9 kx BFD_RELOC_OR1K_TLS_LDM_PG21,
9 kx BFD_RELOC_OR1K_TLS_LDM_LO13,
9 kx BFD_RELOC_OR1K_TLS_LDO_HI16,
9 kx BFD_RELOC_OR1K_TLS_LDO_LO16,
9 kx BFD_RELOC_OR1K_TLS_IE_HI16,
9 kx BFD_RELOC_OR1K_TLS_IE_AHI16,
9 kx BFD_RELOC_OR1K_TLS_IE_LO16,
9 kx BFD_RELOC_OR1K_TLS_IE_PG21,
9 kx BFD_RELOC_OR1K_TLS_IE_LO13,
9 kx BFD_RELOC_OR1K_TLS_LE_HI16,
9 kx BFD_RELOC_OR1K_TLS_LE_AHI16,
9 kx BFD_RELOC_OR1K_TLS_LE_LO16,
9 kx BFD_RELOC_OR1K_TLS_LE_SLO16,
9 kx BFD_RELOC_OR1K_TLS_TPOFF,
9 kx BFD_RELOC_OR1K_TLS_DTPOFF,
9 kx BFD_RELOC_OR1K_TLS_DTPMOD,
9 kx
9 kx /* H8 elf Relocations. */
9 kx BFD_RELOC_H8_DIR16A8,
9 kx BFD_RELOC_H8_DIR16R8,
9 kx BFD_RELOC_H8_DIR24A8,
9 kx BFD_RELOC_H8_DIR24R8,
9 kx BFD_RELOC_H8_DIR32A16,
9 kx BFD_RELOC_H8_DISP32A16,
9 kx
9 kx /* Sony Xstormy16 Relocations. */
9 kx BFD_RELOC_XSTORMY16_REL_12,
9 kx BFD_RELOC_XSTORMY16_12,
9 kx BFD_RELOC_XSTORMY16_24,
9 kx BFD_RELOC_XSTORMY16_FPTR16,
9 kx
9 kx /* Self-describing complex relocations. */
9 kx BFD_RELOC_RELC,
9 kx
9 kx
9 kx /* Relocations used by VAX ELF. */
9 kx BFD_RELOC_VAX_GLOB_DAT,
9 kx BFD_RELOC_VAX_JMP_SLOT,
9 kx BFD_RELOC_VAX_RELATIVE,
9 kx
9 kx /* Morpho MT - 16 bit immediate relocation. */
9 kx BFD_RELOC_MT_PC16,
9 kx
9 kx /* Morpho MT - Hi 16 bits of an address. */
9 kx BFD_RELOC_MT_HI16,
9 kx
9 kx /* Morpho MT - Low 16 bits of an address. */
9 kx BFD_RELOC_MT_LO16,
9 kx
9 kx /* Morpho MT - Used to tell the linker which vtable entries are used. */
9 kx BFD_RELOC_MT_GNU_VTINHERIT,
9 kx
9 kx /* Morpho MT - Used to tell the linker which vtable entries are used. */
9 kx BFD_RELOC_MT_GNU_VTENTRY,
9 kx
9 kx /* Morpho MT - 8 bit immediate relocation. */
9 kx BFD_RELOC_MT_PCINSN8,
9 kx
9 kx /* msp430 specific relocation codes */
9 kx BFD_RELOC_MSP430_10_PCREL,
9 kx BFD_RELOC_MSP430_16_PCREL,
9 kx BFD_RELOC_MSP430_16,
9 kx BFD_RELOC_MSP430_16_PCREL_BYTE,
9 kx BFD_RELOC_MSP430_16_BYTE,
9 kx BFD_RELOC_MSP430_2X_PCREL,
9 kx BFD_RELOC_MSP430_RL_PCREL,
9 kx BFD_RELOC_MSP430_ABS8,
9 kx BFD_RELOC_MSP430X_PCR20_EXT_SRC,
9 kx BFD_RELOC_MSP430X_PCR20_EXT_DST,
9 kx BFD_RELOC_MSP430X_PCR20_EXT_ODST,
9 kx BFD_RELOC_MSP430X_ABS20_EXT_SRC,
9 kx BFD_RELOC_MSP430X_ABS20_EXT_DST,
9 kx BFD_RELOC_MSP430X_ABS20_EXT_ODST,
9 kx BFD_RELOC_MSP430X_ABS20_ADR_SRC,
9 kx BFD_RELOC_MSP430X_ABS20_ADR_DST,
9 kx BFD_RELOC_MSP430X_PCR16,
9 kx BFD_RELOC_MSP430X_PCR20_CALL,
9 kx BFD_RELOC_MSP430X_ABS16,
9 kx BFD_RELOC_MSP430_ABS_HI16,
9 kx BFD_RELOC_MSP430_PREL31,
9 kx BFD_RELOC_MSP430_SYM_DIFF,
9 kx BFD_RELOC_MSP430_SET_ULEB128,
9 kx BFD_RELOC_MSP430_SUB_ULEB128,
9 kx
9 kx /* Relocations used by the Altera Nios II core. */
9 kx BFD_RELOC_NIOS2_S16,
9 kx BFD_RELOC_NIOS2_U16,
9 kx BFD_RELOC_NIOS2_CALL26,
9 kx BFD_RELOC_NIOS2_IMM5,
9 kx BFD_RELOC_NIOS2_CACHE_OPX,
9 kx BFD_RELOC_NIOS2_IMM6,
9 kx BFD_RELOC_NIOS2_IMM8,
9 kx BFD_RELOC_NIOS2_HI16,
9 kx BFD_RELOC_NIOS2_LO16,
9 kx BFD_RELOC_NIOS2_HIADJ16,
9 kx BFD_RELOC_NIOS2_GPREL,
9 kx BFD_RELOC_NIOS2_UJMP,
9 kx BFD_RELOC_NIOS2_CJMP,
9 kx BFD_RELOC_NIOS2_CALLR,
9 kx BFD_RELOC_NIOS2_ALIGN,
9 kx BFD_RELOC_NIOS2_GOT16,
9 kx BFD_RELOC_NIOS2_CALL16,
9 kx BFD_RELOC_NIOS2_GOTOFF_LO,
9 kx BFD_RELOC_NIOS2_GOTOFF_HA,
9 kx BFD_RELOC_NIOS2_PCREL_LO,
9 kx BFD_RELOC_NIOS2_PCREL_HA,
9 kx BFD_RELOC_NIOS2_TLS_GD16,
9 kx BFD_RELOC_NIOS2_TLS_LDM16,
9 kx BFD_RELOC_NIOS2_TLS_LDO16,
9 kx BFD_RELOC_NIOS2_TLS_IE16,
9 kx BFD_RELOC_NIOS2_TLS_LE16,
9 kx BFD_RELOC_NIOS2_TLS_DTPMOD,
9 kx BFD_RELOC_NIOS2_TLS_DTPREL,
9 kx BFD_RELOC_NIOS2_TLS_TPREL,
9 kx BFD_RELOC_NIOS2_COPY,
9 kx BFD_RELOC_NIOS2_GLOB_DAT,
9 kx BFD_RELOC_NIOS2_JUMP_SLOT,
9 kx BFD_RELOC_NIOS2_RELATIVE,
9 kx BFD_RELOC_NIOS2_GOTOFF,
9 kx BFD_RELOC_NIOS2_CALL26_NOAT,
9 kx BFD_RELOC_NIOS2_GOT_LO,
9 kx BFD_RELOC_NIOS2_GOT_HA,
9 kx BFD_RELOC_NIOS2_CALL_LO,
9 kx BFD_RELOC_NIOS2_CALL_HA,
9 kx BFD_RELOC_NIOS2_R2_S12,
9 kx BFD_RELOC_NIOS2_R2_I10_1_PCREL,
9 kx BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
9 kx BFD_RELOC_NIOS2_R2_T1I7_2,
9 kx BFD_RELOC_NIOS2_R2_T2I4,
9 kx BFD_RELOC_NIOS2_R2_T2I4_1,
9 kx BFD_RELOC_NIOS2_R2_T2I4_2,
9 kx BFD_RELOC_NIOS2_R2_X1I7_2,
9 kx BFD_RELOC_NIOS2_R2_X2L5,
9 kx BFD_RELOC_NIOS2_R2_F1I5_2,
9 kx BFD_RELOC_NIOS2_R2_L5I4X1,
9 kx BFD_RELOC_NIOS2_R2_T1X1I6,
9 kx BFD_RELOC_NIOS2_R2_T1X1I6_2,
9 kx
9 kx /* PRU LDI 16-bit unsigned data-memory relocation. */
9 kx BFD_RELOC_PRU_U16,
9 kx
9 kx /* PRU LDI 16-bit unsigned instruction-memory relocation. */
9 kx BFD_RELOC_PRU_U16_PMEMIMM,
9 kx
9 kx /* PRU relocation for two consecutive LDI load instructions that load a
9 kx 32 bit value into a register. If the higher bits are all zero, then
9 kx the second instruction may be relaxed. */
9 kx BFD_RELOC_PRU_LDI32,
9 kx
9 kx /* PRU QBBx 10-bit signed PC-relative relocation. */
9 kx BFD_RELOC_PRU_S10_PCREL,
9 kx
9 kx /* PRU 8-bit unsigned relocation used for the LOOP instruction. */
9 kx BFD_RELOC_PRU_U8_PCREL,
9 kx
9 kx /* PRU Program Memory relocations. Used to convert from byte addressing to
9 kx 32-bit word addressing. */
9 kx BFD_RELOC_PRU_32_PMEM,
9 kx BFD_RELOC_PRU_16_PMEM,
9 kx
9 kx /* PRU relocations to mark the difference of two local symbols.
9 kx These are only needed to support linker relaxation and can be ignored
9 kx when not relaxing. The field is set to the value of the difference
9 kx assuming no relaxation. The relocation encodes the position of the
9 kx second symbol so the linker can determine whether to adjust the field
9 kx value. The PMEM variants encode the word difference, instead of byte
9 kx difference between symbols. */
9 kx BFD_RELOC_PRU_GNU_DIFF8,
9 kx BFD_RELOC_PRU_GNU_DIFF16,
9 kx BFD_RELOC_PRU_GNU_DIFF32,
9 kx BFD_RELOC_PRU_GNU_DIFF16_PMEM,
9 kx BFD_RELOC_PRU_GNU_DIFF32_PMEM,
9 kx
9 kx /* IQ2000 Relocations. */
9 kx BFD_RELOC_IQ2000_OFFSET_16,
9 kx BFD_RELOC_IQ2000_OFFSET_21,
9 kx BFD_RELOC_IQ2000_UHI16,
9 kx
9 kx /* Special Xtensa relocation used only by PLT entries in ELF shared
9 kx objects to indicate that the runtime linker should set the value
9 kx to one of its own internal functions or data structures. */
9 kx BFD_RELOC_XTENSA_RTLD,
9 kx
9 kx /* Xtensa relocations for ELF shared objects. */
9 kx BFD_RELOC_XTENSA_GLOB_DAT,
9 kx BFD_RELOC_XTENSA_JMP_SLOT,
9 kx BFD_RELOC_XTENSA_RELATIVE,
9 kx
9 kx /* Xtensa relocation used in ELF object files for symbols that may require
9 kx PLT entries. Otherwise, this is just a generic 32-bit relocation. */
9 kx BFD_RELOC_XTENSA_PLT,
9 kx
9 kx /* Xtensa relocations for backward compatibility. These have been replaced
9 kx by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
9 kx Xtensa relocations to mark the difference of two local symbols.
9 kx These are only needed to support linker relaxation and can be ignored
9 kx when not relaxing. The field is set to the value of the difference
9 kx assuming no relaxation. The relocation encodes the position of the
9 kx first symbol so the linker can determine whether to adjust the field
9 kx value. */
9 kx BFD_RELOC_XTENSA_DIFF8,
9 kx BFD_RELOC_XTENSA_DIFF16,
9 kx BFD_RELOC_XTENSA_DIFF32,
9 kx
9 kx /* Generic Xtensa relocations for instruction operands. Only the slot
9 kx number is encoded in the relocation. The relocation applies to the
9 kx last PC-relative immediate operand, or if there are no PC-relative
9 kx immediates, to the last immediate operand. */
9 kx BFD_RELOC_XTENSA_SLOT0_OP,
9 kx BFD_RELOC_XTENSA_SLOT1_OP,
9 kx BFD_RELOC_XTENSA_SLOT2_OP,
9 kx BFD_RELOC_XTENSA_SLOT3_OP,
9 kx BFD_RELOC_XTENSA_SLOT4_OP,
9 kx BFD_RELOC_XTENSA_SLOT5_OP,
9 kx BFD_RELOC_XTENSA_SLOT6_OP,
9 kx BFD_RELOC_XTENSA_SLOT7_OP,
9 kx BFD_RELOC_XTENSA_SLOT8_OP,
9 kx BFD_RELOC_XTENSA_SLOT9_OP,
9 kx BFD_RELOC_XTENSA_SLOT10_OP,
9 kx BFD_RELOC_XTENSA_SLOT11_OP,
9 kx BFD_RELOC_XTENSA_SLOT12_OP,
9 kx BFD_RELOC_XTENSA_SLOT13_OP,
9 kx BFD_RELOC_XTENSA_SLOT14_OP,
9 kx
9 kx /* Alternate Xtensa relocations. Only the slot is encoded in the
9 kx relocation. The meaning of these relocations is opcode-specific. */
9 kx BFD_RELOC_XTENSA_SLOT0_ALT,
9 kx BFD_RELOC_XTENSA_SLOT1_ALT,
9 kx BFD_RELOC_XTENSA_SLOT2_ALT,
9 kx BFD_RELOC_XTENSA_SLOT3_ALT,
9 kx BFD_RELOC_XTENSA_SLOT4_ALT,
9 kx BFD_RELOC_XTENSA_SLOT5_ALT,
9 kx BFD_RELOC_XTENSA_SLOT6_ALT,
9 kx BFD_RELOC_XTENSA_SLOT7_ALT,
9 kx BFD_RELOC_XTENSA_SLOT8_ALT,
9 kx BFD_RELOC_XTENSA_SLOT9_ALT,
9 kx BFD_RELOC_XTENSA_SLOT10_ALT,
9 kx BFD_RELOC_XTENSA_SLOT11_ALT,
9 kx BFD_RELOC_XTENSA_SLOT12_ALT,
9 kx BFD_RELOC_XTENSA_SLOT13_ALT,
9 kx BFD_RELOC_XTENSA_SLOT14_ALT,
9 kx
9 kx /* Xtensa relocations for backward compatibility. These have all been
9 kx replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
9 kx BFD_RELOC_XTENSA_OP0,
9 kx BFD_RELOC_XTENSA_OP1,
9 kx BFD_RELOC_XTENSA_OP2,
9 kx
9 kx /* Xtensa relocation to mark that the assembler expanded the
9 kx instructions from an original target. The expansion size is
9 kx encoded in the reloc size. */
9 kx BFD_RELOC_XTENSA_ASM_EXPAND,
9 kx
9 kx /* Xtensa relocation to mark that the linker should simplify
9 kx assembler-expanded instructions. This is commonly used
9 kx internally by the linker after analysis of a
9 kx BFD_RELOC_XTENSA_ASM_EXPAND. */
9 kx BFD_RELOC_XTENSA_ASM_SIMPLIFY,
9 kx
9 kx /* Xtensa TLS relocations. */
9 kx BFD_RELOC_XTENSA_TLSDESC_FN,
9 kx BFD_RELOC_XTENSA_TLSDESC_ARG,
9 kx BFD_RELOC_XTENSA_TLS_DTPOFF,
9 kx BFD_RELOC_XTENSA_TLS_TPOFF,
9 kx BFD_RELOC_XTENSA_TLS_FUNC,
9 kx BFD_RELOC_XTENSA_TLS_ARG,
9 kx BFD_RELOC_XTENSA_TLS_CALL,
9 kx
9 kx /* Xtensa relocations to mark the difference of two local symbols.
9 kx These are only needed to support linker relaxation and can be ignored
9 kx when not relaxing. The field is set to the value of the difference
9 kx assuming no relaxation. The relocation encodes the position of the
9 kx subtracted symbol so the linker can determine whether to adjust the field
9 kx value. PDIFF relocations are used for positive differences, NDIFF
9 kx relocations are used for negative differences. The difference value
9 kx is treated as unsigned with these relocation types, giving full
9 kx 8/16 value ranges. */
9 kx BFD_RELOC_XTENSA_PDIFF8,
9 kx BFD_RELOC_XTENSA_PDIFF16,
9 kx BFD_RELOC_XTENSA_PDIFF32,
9 kx BFD_RELOC_XTENSA_NDIFF8,
9 kx BFD_RELOC_XTENSA_NDIFF16,
9 kx BFD_RELOC_XTENSA_NDIFF32,
9 kx
9 kx /* 8 bit signed offset in (ix+d) or (iy+d). */
9 kx BFD_RELOC_Z80_DISP8,
9 kx
9 kx /* First 8 bits of multibyte (32, 24 or 16 bit) value. */
9 kx BFD_RELOC_Z80_BYTE0,
9 kx
9 kx /* Second 8 bits of multibyte (32, 24 or 16 bit) value. */
9 kx BFD_RELOC_Z80_BYTE1,
9 kx
9 kx /* Third 8 bits of multibyte (32 or 24 bit) value. */
9 kx BFD_RELOC_Z80_BYTE2,
9 kx
9 kx /* Fourth 8 bits of multibyte (32 bit) value. */
9 kx BFD_RELOC_Z80_BYTE3,
9 kx
9 kx /* Lowest 16 bits of multibyte (32 or 24 bit) value. */
9 kx BFD_RELOC_Z80_WORD0,
9 kx
9 kx /* Highest 16 bits of multibyte (32 or 24 bit) value. */
9 kx BFD_RELOC_Z80_WORD1,
9 kx
9 kx /* Like BFD_RELOC_16 but big-endian. */
9 kx BFD_RELOC_Z80_16_BE,
9 kx
9 kx /* DJNZ offset. */
9 kx BFD_RELOC_Z8K_DISP7,
9 kx
9 kx /* CALR offset. */
9 kx BFD_RELOC_Z8K_CALLR,
9 kx
9 kx /* 4 bit value. */
9 kx BFD_RELOC_Z8K_IMM4L,
9 kx
9 kx /* Lattice Mico32 relocations. */
9 kx BFD_RELOC_LM32_CALL,
9 kx BFD_RELOC_LM32_BRANCH,
9 kx BFD_RELOC_LM32_16_GOT,
9 kx BFD_RELOC_LM32_GOTOFF_HI16,
9 kx BFD_RELOC_LM32_GOTOFF_LO16,
9 kx BFD_RELOC_LM32_COPY,
9 kx BFD_RELOC_LM32_GLOB_DAT,
9 kx BFD_RELOC_LM32_JMP_SLOT,
9 kx BFD_RELOC_LM32_RELATIVE,
9 kx
9 kx /* Difference between two section addreses. Must be followed by a
9 kx BFD_RELOC_MACH_O_PAIR. */
9 kx BFD_RELOC_MACH_O_SECTDIFF,
9 kx
9 kx /* Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol. */
9 kx BFD_RELOC_MACH_O_LOCAL_SECTDIFF,
9 kx
9 kx /* Pair of relocation. Contains the first symbol. */
9 kx BFD_RELOC_MACH_O_PAIR,
9 kx
9 kx /* Symbol will be substracted. Must be followed by a BFD_RELOC_32. */
9 kx BFD_RELOC_MACH_O_SUBTRACTOR32,
9 kx
9 kx /* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */
9 kx BFD_RELOC_MACH_O_SUBTRACTOR64,
9 kx
9 kx /* PCREL relocations. They are marked as branch to create PLT entry if
9 kx required. */
9 kx BFD_RELOC_MACH_O_X86_64_BRANCH32,
9 kx BFD_RELOC_MACH_O_X86_64_BRANCH8,
9 kx
9 kx /* Used when referencing a GOT entry. */
9 kx BFD_RELOC_MACH_O_X86_64_GOT,
9 kx
9 kx /* Used when loading a GOT entry with movq. It is specially marked so that
9 kx the linker could optimize the movq to a leaq if possible. */
9 kx BFD_RELOC_MACH_O_X86_64_GOT_LOAD,
9 kx
9 kx /* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */
9 kx BFD_RELOC_MACH_O_X86_64_PCREL32_1,
9 kx
9 kx /* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */
9 kx BFD_RELOC_MACH_O_X86_64_PCREL32_2,
9 kx
9 kx /* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */
9 kx BFD_RELOC_MACH_O_X86_64_PCREL32_4,
9 kx
9 kx /* Used when referencing a TLV entry. */
9 kx BFD_RELOC_MACH_O_X86_64_TLV,
9 kx
9 kx /* Addend for PAGE or PAGEOFF. */
9 kx BFD_RELOC_MACH_O_ARM64_ADDEND,
9 kx
9 kx /* Relative offset to page of GOT slot. */
9 kx BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21,
9 kx
9 kx /* Relative offset within page of GOT slot. */
9 kx BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12,
9 kx
9 kx /* Address of a GOT entry. */
9 kx BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT,
9 kx
9 kx /* This is a 32 bit reloc for the microblaze that stores the
9 kx low 16 bits of a value */
9 kx BFD_RELOC_MICROBLAZE_32_LO,
9 kx
9 kx /* This is a 32 bit pc-relative reloc for the microblaze that
9 kx stores the low 16 bits of a value */
9 kx BFD_RELOC_MICROBLAZE_32_LO_PCREL,
9 kx
9 kx /* This is a 32 bit reloc for the microblaze that stores a
9 kx value relative to the read-only small data area anchor */
9 kx BFD_RELOC_MICROBLAZE_32_ROSDA,
9 kx
9 kx /* This is a 32 bit reloc for the microblaze that stores a
9 kx value relative to the read-write small data area anchor */
9 kx BFD_RELOC_MICROBLAZE_32_RWSDA,
9 kx
9 kx /* This is a 32 bit reloc for the microblaze to handle
9 kx expressions of the form "Symbol Op Symbol" */
9 kx BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit pc relative
9 kx value in two words (with an imm instruction). No relocation is
9 kx done here - only used for relaxing */
9 kx BFD_RELOC_MICROBLAZE_64_NONE,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit pc relative
9 kx value in two words (with an imm instruction). The relocation is
9 kx PC-relative GOT offset */
9 kx BFD_RELOC_MICROBLAZE_64_GOTPC,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit pc relative
9 kx value in two words (with an imm instruction). The relocation is
9 kx GOT offset */
9 kx BFD_RELOC_MICROBLAZE_64_GOT,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit pc relative
9 kx value in two words (with an imm instruction). The relocation is
9 kx PC-relative offset into PLT */
9 kx BFD_RELOC_MICROBLAZE_64_PLT,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit GOT relative
9 kx value in two words (with an imm instruction). The relocation is
9 kx relative offset from _GLOBAL_OFFSET_TABLE_ */
9 kx BFD_RELOC_MICROBLAZE_64_GOTOFF,
9 kx
9 kx /* This is a 32 bit reloc that stores the 32 bit GOT relative
9 kx value in a word. The relocation is relative offset from */
9 kx BFD_RELOC_MICROBLAZE_32_GOTOFF,
9 kx
9 kx /* This is used to tell the dynamic linker to copy the value out of
9 kx the dynamic object into the runtime process image. */
9 kx BFD_RELOC_MICROBLAZE_COPY,
9 kx
9 kx /* Unused Reloc */
9 kx BFD_RELOC_MICROBLAZE_64_TLS,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit GOT relative value
9 kx of the GOT TLS GD info entry in two words (with an imm instruction). The
9 kx relocation is GOT offset. */
9 kx BFD_RELOC_MICROBLAZE_64_TLSGD,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit GOT relative value
9 kx of the GOT TLS LD info entry in two words (with an imm instruction). The
9 kx relocation is GOT offset. */
9 kx BFD_RELOC_MICROBLAZE_64_TLSLD,
9 kx
9 kx /* This is a 32 bit reloc that stores the Module ID to GOT(n). */
9 kx BFD_RELOC_MICROBLAZE_32_TLSDTPMOD,
9 kx
9 kx /* This is a 32 bit reloc that stores TLS offset to GOT(n+1). */
9 kx BFD_RELOC_MICROBLAZE_32_TLSDTPREL,
9 kx
9 kx /* This is a 32 bit reloc for storing TLS offset to two words (uses imm
9 kx instruction) */
9 kx BFD_RELOC_MICROBLAZE_64_TLSDTPREL,
9 kx
9 kx /* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
9 kx to two words (uses imm instruction). */
9 kx BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL,
9 kx
9 kx /* This is a 64 bit reloc that stores 32-bit thread pointer relative offset
9 kx to two words (uses imm instruction). */
9 kx BFD_RELOC_MICROBLAZE_64_TLSTPREL,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit pc relative
9 kx value in two words (with an imm instruction). The relocation is
9 kx PC-relative offset from start of TEXT. */
9 kx BFD_RELOC_MICROBLAZE_64_TEXTPCREL,
9 kx
9 kx /* This is a 64 bit reloc that stores the 32 bit offset
9 kx value in two words (with an imm instruction). The relocation is
9 kx relative offset from start of TEXT. */
9 kx BFD_RELOC_MICROBLAZE_64_TEXTREL,
9 kx
9 kx /* AArch64 pseudo relocation code to mark the start of the AArch64
9 kx relocation enumerators. N.B. the order of the enumerators is
9 kx important as several tables in the AArch64 bfd backend are indexed
9 kx by these enumerators; make sure they are all synced. */
9 kx BFD_RELOC_AARCH64_RELOC_START,
9 kx
9 kx /* Deprecated AArch64 null relocation code. */
9 kx BFD_RELOC_AARCH64_NULL,
9 kx
9 kx /* AArch64 null relocation code. */
9 kx BFD_RELOC_AARCH64_NONE,
9 kx
9 kx /* Basic absolute relocations of N bits. These are equivalent to
9 kx BFD_RELOC_N and they were added to assist the indexing of the howto
9 kx table. */
9 kx BFD_RELOC_AARCH64_64,
9 kx BFD_RELOC_AARCH64_32,
9 kx BFD_RELOC_AARCH64_16,
9 kx
9 kx /* PC-relative relocations. These are equivalent to BFD_RELOC_N_PCREL
9 kx and they were added to assist the indexing of the howto table. */
9 kx BFD_RELOC_AARCH64_64_PCREL,
9 kx BFD_RELOC_AARCH64_32_PCREL,
9 kx BFD_RELOC_AARCH64_16_PCREL,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with most significant bits 0 to 15
9 kx of an unsigned address/value. */
9 kx BFD_RELOC_AARCH64_MOVW_G0,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
9 kx an address/value. No overflow checking. */
9 kx BFD_RELOC_AARCH64_MOVW_G0_NC,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with most significant bits 16 to 31
9 kx of an unsigned address/value. */
9 kx BFD_RELOC_AARCH64_MOVW_G1,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with less significant bits 16 to 31
9 kx of an address/value. No overflow checking. */
9 kx BFD_RELOC_AARCH64_MOVW_G1_NC,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with most significant bits 32 to 47
9 kx of an unsigned address/value. */
9 kx BFD_RELOC_AARCH64_MOVW_G2,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with less significant bits 32 to 47
9 kx of an address/value. No overflow checking. */
9 kx BFD_RELOC_AARCH64_MOVW_G2_NC,
9 kx
9 kx /* AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
9 kx of a signed or unsigned address/value. */
9 kx BFD_RELOC_AARCH64_MOVW_G3,
9 kx
9 kx /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
9 kx of a signed value. Changes instruction to MOVZ or MOVN depending on the
9 kx value's sign. */
9 kx BFD_RELOC_AARCH64_MOVW_G0_S,
9 kx
9 kx /* AArch64 MOV[NZ] instruction with most significant bits 16 to 31
9 kx of a signed value. Changes instruction to MOVZ or MOVN depending on the
9 kx value's sign. */
9 kx BFD_RELOC_AARCH64_MOVW_G1_S,
9 kx
9 kx /* AArch64 MOV[NZ] instruction with most significant bits 32 to 47
9 kx of a signed value. Changes instruction to MOVZ or MOVN depending on the
9 kx value's sign. */
9 kx BFD_RELOC_AARCH64_MOVW_G2_S,
9 kx
9 kx /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
9 kx of a signed value. Changes instruction to MOVZ or MOVN depending on the
9 kx value's sign. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G0,
9 kx
9 kx /* AArch64 MOV[NZ] instruction with most significant bits 0 to 15
9 kx of a signed value. Changes instruction to MOVZ or MOVN depending on the
9 kx value's sign. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
9 kx
9 kx /* AArch64 MOVK instruction with most significant bits 16 to 31
9 kx of a signed value. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G1,
9 kx
9 kx /* AArch64 MOVK instruction with most significant bits 16 to 31
9 kx of a signed value. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
9 kx
9 kx /* AArch64 MOVK instruction with most significant bits 32 to 47
9 kx of a signed value. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G2,
9 kx
9 kx /* AArch64 MOVK instruction with most significant bits 32 to 47
9 kx of a signed value. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
9 kx
9 kx /* AArch64 MOVK instruction with most significant bits 47 to 63
9 kx of a signed value. */
9 kx BFD_RELOC_AARCH64_MOVW_PREL_G3,
9 kx
9 kx /* AArch64 Load Literal instruction, holding a 19 bit pc-relative word
9 kx offset. The lowest two bits must be zero and are not stored in the
9 kx instruction, giving a 21 bit signed byte offset. */
9 kx BFD_RELOC_AARCH64_LD_LO19_PCREL,
9 kx
9 kx /* AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset. */
9 kx BFD_RELOC_AARCH64_ADR_LO21_PCREL,
9 kx
9 kx /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
9 kx offset, giving a 4KB aligned page base address. */
9 kx BFD_RELOC_AARCH64_ADR_HI21_PCREL,
9 kx
9 kx /* AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
9 kx offset, giving a 4KB aligned page base address, but with no overflow
9 kx checking. */
9 kx BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL,
9 kx
9 kx /* AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
9 kx Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_ADD_LO12,
9 kx
9 kx /* AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST8_LO12,
9 kx
9 kx /* AArch64 14 bit pc-relative test bit and branch.
9 kx The lowest two bits must be zero and are not stored in the instruction,
9 kx giving a 16 bit signed byte offset. */
9 kx BFD_RELOC_AARCH64_TSTBR14,
9 kx
9 kx /* AArch64 19 bit pc-relative conditional branch and compare & branch.
9 kx The lowest two bits must be zero and are not stored in the instruction,
9 kx giving a 21 bit signed byte offset. */
9 kx BFD_RELOC_AARCH64_BRANCH19,
9 kx
9 kx /* AArch64 26 bit pc-relative unconditional branch.
9 kx The lowest two bits must be zero and are not stored in the instruction,
9 kx giving a 28 bit signed byte offset. */
9 kx BFD_RELOC_AARCH64_JUMP26,
9 kx
9 kx /* AArch64 26 bit pc-relative unconditional branch and link.
9 kx The lowest two bits must be zero and are not stored in the instruction,
9 kx giving a 28 bit signed byte offset. */
9 kx BFD_RELOC_AARCH64_CALL26,
9 kx
9 kx /* AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST16_LO12,
9 kx
9 kx /* AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST32_LO12,
9 kx
9 kx /* AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST64_LO12,
9 kx
9 kx /* AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST128_LO12,
9 kx
9 kx /* AArch64 Load Literal instruction, holding a 19 bit PC relative word
9 kx offset of the global offset table entry for a symbol. The lowest two
9 kx bits must be zero and are not stored in the instruction, giving a 21
9 kx bit signed byte offset. This relocation type requires signed overflow
9 kx checking. */
9 kx BFD_RELOC_AARCH64_GOT_LD_PREL19,
9 kx
9 kx /* Get to the page base of the global offset table entry for a symbol as
9 kx part of an ADRP instruction using a 21 bit PC relative value.Used in
9 kx conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC. */
9 kx BFD_RELOC_AARCH64_ADR_GOT_PAGE,
9 kx
9 kx /* Unsigned 12 bit byte offset for 64 bit load/store from the page of
9 kx the GOT entry for this symbol. Used in conjunction with
9 kx BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in LP64 ABI only. */
9 kx BFD_RELOC_AARCH64_LD64_GOT_LO12_NC,
9 kx
9 kx /* Unsigned 12 bit byte offset for 32 bit load/store from the page of
9 kx the GOT entry for this symbol. Used in conjunction with
9 kx BFD_RELOC_AARCH64_ADR_GOT_PAGE. Valid in ILP32 ABI only. */
9 kx BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
9 kx
9 kx /* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
9 kx for this symbol. Valid in LP64 ABI only. */
9 kx BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
9 kx
9 kx /* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
9 kx for this symbol. Valid in LP64 ABI only. */
9 kx BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
9 kx
9 kx /* Unsigned 15 bit byte offset for 64 bit load/store from the page of
9 kx the GOT entry for this symbol. Valid in LP64 ABI only. */
9 kx BFD_RELOC_AARCH64_LD64_GOTOFF_LO15,
9 kx
9 kx /* Scaled 14 bit byte offset to the page base of the global offset table. */
9 kx BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14,
9 kx
9 kx /* Scaled 15 bit byte offset to the page base of the global offset table. */
9 kx BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15,
9 kx
9 kx /* Get to the page base of the global offset table entry for a symbols
9 kx tls_index structure as part of an adrp instruction using a 21 bit PC
9 kx relative value. Used in conjunction with
9 kx BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC. */
9 kx BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
9 kx
9 kx /* AArch64 TLS General Dynamic */
9 kx BFD_RELOC_AARCH64_TLSGD_ADR_PREL21,
9 kx
9 kx /* Unsigned 12 bit byte offset to global offset table entry for a symbols
9 kx tls_index structure. Used in conjunction with
9 kx BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */
9 kx BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC,
9 kx
9 kx /* AArch64 TLS General Dynamic relocation. */
9 kx BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC,
9 kx
9 kx /* AArch64 TLS General Dynamic relocation. */
9 kx BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
9 kx
9 kx /* AArch64 TLS INITIAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
9 kx
9 kx /* bit[23:12] of byte offset to module TLS base address. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
9 kx
9 kx /* Unsigned 12 bit byte offset to module TLS base address. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12,
9 kx
9 kx /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC,
9 kx
9 kx /* Unsigned 12 bit byte offset to global offset table entry for a symbols
9 kx tls_index structure. Used in conjunction with
9 kx BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC,
9 kx
9 kx /* GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
9 kx instruction. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21,
9 kx
9 kx /* GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction. */
9 kx BFD_RELOC_AARCH64_TLSLD_ADR_PREL21,
9 kx
9 kx /* bit[11:1] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
9 kx
9 kx /* bit[11:2] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
9 kx
9 kx /* bit[11:3] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
9 kx
9 kx /* bit[11:0] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
9 kx
9 kx /* bit[15:0] of byte offset to module TLS base address. */
9 kx BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
9 kx
9 kx /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0 */
9 kx BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
9 kx
9 kx /* bit[31:16] of byte offset to module TLS base address. */
9 kx BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
9 kx
9 kx /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1 */
9 kx BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
9 kx
9 kx /* bit[47:32] of byte offset to module TLS base address. */
9 kx BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12,
9 kx
9 kx /* AArch64 TLS LOCAL EXEC relocation. */
9 kx BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC,
9 kx
9 kx /* bit[11:1] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
9 kx
9 kx /* bit[11:2] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
9 kx
9 kx /* bit[11:3] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
9 kx
9 kx /* bit[11:0] of byte offset to module TLS base address, encoded in ldst
9 kx instructions. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_LD_PREL19,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_LD64_LO12,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_ADD_LO12,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_OFF_G1,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_LDR,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_ADD,
9 kx
9 kx /* AArch64 TLS DESC relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC_CALL,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_COPY,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_GLOB_DAT,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_JUMP_SLOT,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_RELATIVE,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_TLS_DTPMOD,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_TLS_DTPREL,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_TLS_TPREL,
9 kx
9 kx /* AArch64 TLS relocation. */
9 kx BFD_RELOC_AARCH64_TLSDESC,
9 kx
9 kx /* AArch64 support for STT_GNU_IFUNC. */
9 kx BFD_RELOC_AARCH64_IRELATIVE,
9 kx
9 kx /* AArch64 pseudo relocation code to mark the end of the AArch64
9 kx relocation enumerators that have direct mapping to ELF reloc codes.
9 kx There are a few more enumerators after this one; those are mainly
9 kx used by the AArch64 assembler for the internal fixup or to select
9 kx one of the above enumerators. */
9 kx BFD_RELOC_AARCH64_RELOC_END,
9 kx
9 kx /* AArch64 pseudo relocation code to be used internally by the AArch64
9 kx assembler and not (currently) written to any object files. */
9 kx BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP,
9 kx
9 kx /* AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
9 kx address. Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL. */
9 kx BFD_RELOC_AARCH64_LDST_LO12,
9 kx
9 kx /* AArch64 pseudo relocation code for TLS local dynamic mode. It's to be
9 kx used internally by the AArch64 assembler and not (currently) written to
9 kx any object files. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC,
9 kx
9 kx /* AArch64 pseudo relocation code for TLS local exec mode. It's to be
9 kx used internally by the AArch64 assembler and not (currently) written to
9 kx any object files. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12,
9 kx
9 kx /* Similar as BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12, but no overflow check. */
9 kx BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
9 kx
9 kx /* AArch64 pseudo relocation code to be used internally by the AArch64
9 kx assembler and not (currently) written to any object files. */
9 kx BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
9 kx
9 kx /* AArch64 pseudo relocation code to be used internally by the AArch64
9 kx assembler and not (currently) written to any object files. */
9 kx BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC,
9 kx
9 kx /* AArch64 pseudo relocation code to be used internally by the AArch64
9 kx assembler and not (currently) written to any object files. */
9 kx BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC,
9 kx
9 kx /* Tilera TILEPro Relocations. */
9 kx BFD_RELOC_TILEPRO_COPY,
9 kx BFD_RELOC_TILEPRO_GLOB_DAT,
9 kx BFD_RELOC_TILEPRO_JMP_SLOT,
9 kx BFD_RELOC_TILEPRO_RELATIVE,
9 kx BFD_RELOC_TILEPRO_BROFF_X1,
9 kx BFD_RELOC_TILEPRO_JOFFLONG_X1,
9 kx BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT,
9 kx BFD_RELOC_TILEPRO_IMM8_X0,
9 kx BFD_RELOC_TILEPRO_IMM8_Y0,
9 kx BFD_RELOC_TILEPRO_IMM8_X1,
9 kx BFD_RELOC_TILEPRO_IMM8_Y1,
9 kx BFD_RELOC_TILEPRO_DEST_IMM8_X1,
9 kx BFD_RELOC_TILEPRO_MT_IMM15_X1,
9 kx BFD_RELOC_TILEPRO_MF_IMM15_X1,
9 kx BFD_RELOC_TILEPRO_IMM16_X0,
9 kx BFD_RELOC_TILEPRO_IMM16_X1,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_GOT,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_GOT,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA,
9 kx BFD_RELOC_TILEPRO_MMSTART_X0,
9 kx BFD_RELOC_TILEPRO_MMEND_X0,
9 kx BFD_RELOC_TILEPRO_MMSTART_X1,
9 kx BFD_RELOC_TILEPRO_MMEND_X1,
9 kx BFD_RELOC_TILEPRO_SHAMT_X0,
9 kx BFD_RELOC_TILEPRO_SHAMT_X1,
9 kx BFD_RELOC_TILEPRO_SHAMT_Y0,
9 kx BFD_RELOC_TILEPRO_SHAMT_Y1,
9 kx BFD_RELOC_TILEPRO_TLS_GD_CALL,
9 kx BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
9 kx BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
9 kx BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
9 kx BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
9 kx BFD_RELOC_TILEPRO_TLS_IE_LOAD,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA,
9 kx BFD_RELOC_TILEPRO_TLS_DTPMOD32,
9 kx BFD_RELOC_TILEPRO_TLS_DTPOFF32,
9 kx BFD_RELOC_TILEPRO_TLS_TPOFF32,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
9 kx BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
9 kx BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
9 kx
9 kx /* Tilera TILE-Gx Relocations. */
9 kx BFD_RELOC_TILEGX_HW0,
9 kx BFD_RELOC_TILEGX_HW1,
9 kx BFD_RELOC_TILEGX_HW2,
9 kx BFD_RELOC_TILEGX_HW3,
9 kx BFD_RELOC_TILEGX_HW0_LAST,
9 kx BFD_RELOC_TILEGX_HW1_LAST,
9 kx BFD_RELOC_TILEGX_HW2_LAST,
9 kx BFD_RELOC_TILEGX_COPY,
9 kx BFD_RELOC_TILEGX_GLOB_DAT,
9 kx BFD_RELOC_TILEGX_JMP_SLOT,
9 kx BFD_RELOC_TILEGX_RELATIVE,
9 kx BFD_RELOC_TILEGX_BROFF_X1,
9 kx BFD_RELOC_TILEGX_JUMPOFF_X1,
9 kx BFD_RELOC_TILEGX_JUMPOFF_X1_PLT,
9 kx BFD_RELOC_TILEGX_IMM8_X0,
9 kx BFD_RELOC_TILEGX_IMM8_Y0,
9 kx BFD_RELOC_TILEGX_IMM8_X1,
9 kx BFD_RELOC_TILEGX_IMM8_Y1,
9 kx BFD_RELOC_TILEGX_DEST_IMM8_X1,
9 kx BFD_RELOC_TILEGX_MT_IMM14_X1,
9 kx BFD_RELOC_TILEGX_MF_IMM14_X1,
9 kx BFD_RELOC_TILEGX_MMSTART_X0,
9 kx BFD_RELOC_TILEGX_MMEND_X0,
9 kx BFD_RELOC_TILEGX_SHAMT_X0,
9 kx BFD_RELOC_TILEGX_SHAMT_X1,
9 kx BFD_RELOC_TILEGX_SHAMT_Y0,
9 kx BFD_RELOC_TILEGX_SHAMT_Y1,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW3,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW3,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE,
9 kx BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE,
9 kx BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE,
9 kx BFD_RELOC_TILEGX_TLS_DTPMOD64,
9 kx BFD_RELOC_TILEGX_TLS_DTPOFF64,
9 kx BFD_RELOC_TILEGX_TLS_TPOFF64,
9 kx BFD_RELOC_TILEGX_TLS_DTPMOD32,
9 kx BFD_RELOC_TILEGX_TLS_DTPOFF32,
9 kx BFD_RELOC_TILEGX_TLS_TPOFF32,
9 kx BFD_RELOC_TILEGX_TLS_GD_CALL,
9 kx BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD,
9 kx BFD_RELOC_TILEGX_TLS_IE_LOAD,
9 kx BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD,
9 kx BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD,
9 kx
9 kx /* Linux eBPF relocations. */
9 kx BFD_RELOC_BPF_64,
9 kx BFD_RELOC_BPF_32,
9 kx BFD_RELOC_BPF_16,
9 kx BFD_RELOC_BPF_DISP16,
9 kx BFD_RELOC_BPF_DISP32,
9 kx
9 kx /* Adapteva EPIPHANY - 8 bit signed pc-relative displacement */
9 kx BFD_RELOC_EPIPHANY_SIMM8,
9 kx
9 kx /* Adapteva EPIPHANY - 24 bit signed pc-relative displacement */
9 kx BFD_RELOC_EPIPHANY_SIMM24,
9 kx
9 kx /* Adapteva EPIPHANY - 16 most-significant bits of absolute address */
9 kx BFD_RELOC_EPIPHANY_HIGH,
9 kx
9 kx /* Adapteva EPIPHANY - 16 least-significant bits of absolute address */
9 kx BFD_RELOC_EPIPHANY_LOW,
9 kx
9 kx /* Adapteva EPIPHANY - 11 bit signed number - add/sub immediate */
9 kx BFD_RELOC_EPIPHANY_SIMM11,
9 kx
9 kx /* Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement) */
9 kx BFD_RELOC_EPIPHANY_IMM11,
9 kx
9 kx /* Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction. */
9 kx BFD_RELOC_EPIPHANY_IMM8,
9 kx
9 kx /* Visium Relocations. */
9 kx BFD_RELOC_VISIUM_HI16,
9 kx BFD_RELOC_VISIUM_LO16,
9 kx BFD_RELOC_VISIUM_IM16,
9 kx BFD_RELOC_VISIUM_REL16,
9 kx BFD_RELOC_VISIUM_HI16_PCREL,
9 kx BFD_RELOC_VISIUM_LO16_PCREL,
9 kx BFD_RELOC_VISIUM_IM16_PCREL,
9 kx
9 kx /* WebAssembly relocations. */
9 kx BFD_RELOC_WASM32_LEB128,
9 kx BFD_RELOC_WASM32_LEB128_GOT,
9 kx BFD_RELOC_WASM32_LEB128_GOT_CODE,
9 kx BFD_RELOC_WASM32_LEB128_PLT,
9 kx BFD_RELOC_WASM32_PLT_INDEX,
9 kx BFD_RELOC_WASM32_ABS32_CODE,
9 kx BFD_RELOC_WASM32_COPY,
9 kx BFD_RELOC_WASM32_CODE_POINTER,
9 kx BFD_RELOC_WASM32_INDEX,
9 kx BFD_RELOC_WASM32_PLT_SIG,
9 kx
9 kx /* C-SKY relocations. */
9 kx BFD_RELOC_CKCORE_NONE,
9 kx BFD_RELOC_CKCORE_ADDR32,
9 kx BFD_RELOC_CKCORE_PCREL_IMM8BY4,
9 kx BFD_RELOC_CKCORE_PCREL_IMM11BY2,
9 kx BFD_RELOC_CKCORE_PCREL_IMM4BY2,
9 kx BFD_RELOC_CKCORE_PCREL32,
9 kx BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2,
9 kx BFD_RELOC_CKCORE_GNU_VTINHERIT,
9 kx BFD_RELOC_CKCORE_GNU_VTENTRY,
9 kx BFD_RELOC_CKCORE_RELATIVE,
9 kx BFD_RELOC_CKCORE_COPY,
9 kx BFD_RELOC_CKCORE_GLOB_DAT,
9 kx BFD_RELOC_CKCORE_JUMP_SLOT,
9 kx BFD_RELOC_CKCORE_GOTOFF,
9 kx BFD_RELOC_CKCORE_GOTPC,
9 kx BFD_RELOC_CKCORE_GOT32,
9 kx BFD_RELOC_CKCORE_PLT32,
9 kx BFD_RELOC_CKCORE_ADDRGOT,
9 kx BFD_RELOC_CKCORE_ADDRPLT,
9 kx BFD_RELOC_CKCORE_PCREL_IMM26BY2,
9 kx BFD_RELOC_CKCORE_PCREL_IMM16BY2,
9 kx BFD_RELOC_CKCORE_PCREL_IMM16BY4,
9 kx BFD_RELOC_CKCORE_PCREL_IMM10BY2,
9 kx BFD_RELOC_CKCORE_PCREL_IMM10BY4,
9 kx BFD_RELOC_CKCORE_ADDR_HI16,
9 kx BFD_RELOC_CKCORE_ADDR_LO16,
9 kx BFD_RELOC_CKCORE_GOTPC_HI16,
9 kx BFD_RELOC_CKCORE_GOTPC_LO16,
9 kx BFD_RELOC_CKCORE_GOTOFF_HI16,
9 kx BFD_RELOC_CKCORE_GOTOFF_LO16,
9 kx BFD_RELOC_CKCORE_GOT12,
9 kx BFD_RELOC_CKCORE_GOT_HI16,
9 kx BFD_RELOC_CKCORE_GOT_LO16,
9 kx BFD_RELOC_CKCORE_PLT12,
9 kx BFD_RELOC_CKCORE_PLT_HI16,
9 kx BFD_RELOC_CKCORE_PLT_LO16,
9 kx BFD_RELOC_CKCORE_ADDRGOT_HI16,
9 kx BFD_RELOC_CKCORE_ADDRGOT_LO16,
9 kx BFD_RELOC_CKCORE_ADDRPLT_HI16,
9 kx BFD_RELOC_CKCORE_ADDRPLT_LO16,
9 kx BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2,
9 kx BFD_RELOC_CKCORE_TOFFSET_LO16,
9 kx BFD_RELOC_CKCORE_DOFFSET_LO16,
9 kx BFD_RELOC_CKCORE_PCREL_IMM18BY2,
9 kx BFD_RELOC_CKCORE_DOFFSET_IMM18,
9 kx BFD_RELOC_CKCORE_DOFFSET_IMM18BY2,
9 kx BFD_RELOC_CKCORE_DOFFSET_IMM18BY4,
9 kx BFD_RELOC_CKCORE_GOTOFF_IMM18,
9 kx BFD_RELOC_CKCORE_GOT_IMM18BY4,
9 kx BFD_RELOC_CKCORE_PLT_IMM18BY4,
9 kx BFD_RELOC_CKCORE_PCREL_IMM7BY4,
9 kx BFD_RELOC_CKCORE_TLS_LE32,
9 kx BFD_RELOC_CKCORE_TLS_IE32,
9 kx BFD_RELOC_CKCORE_TLS_GD32,
9 kx BFD_RELOC_CKCORE_TLS_LDM32,
9 kx BFD_RELOC_CKCORE_TLS_LDO32,
9 kx BFD_RELOC_CKCORE_TLS_DTPMOD32,
9 kx BFD_RELOC_CKCORE_TLS_DTPOFF32,
9 kx BFD_RELOC_CKCORE_TLS_TPOFF32,
9 kx BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4,
9 kx BFD_RELOC_CKCORE_NOJSRI,
9 kx BFD_RELOC_CKCORE_CALLGRAPH,
9 kx BFD_RELOC_CKCORE_IRELATIVE,
9 kx BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
9 kx BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
9 kx
9 kx /* S12Z relocations. */
9 kx BFD_RELOC_S12Z_OPR,
9 kx
9 kx /* LARCH relocations. */
9 kx BFD_RELOC_LARCH_TLS_DTPMOD32,
9 kx BFD_RELOC_LARCH_TLS_DTPREL32,
9 kx BFD_RELOC_LARCH_TLS_DTPMOD64,
9 kx BFD_RELOC_LARCH_TLS_DTPREL64,
9 kx BFD_RELOC_LARCH_TLS_TPREL32,
9 kx BFD_RELOC_LARCH_TLS_TPREL64,
9 kx BFD_RELOC_LARCH_MARK_LA,
9 kx BFD_RELOC_LARCH_MARK_PCREL,
9 kx BFD_RELOC_LARCH_SOP_PUSH_PCREL,
9 kx BFD_RELOC_LARCH_SOP_PUSH_ABSOLUTE,
9 kx BFD_RELOC_LARCH_SOP_PUSH_DUP,
9 kx BFD_RELOC_LARCH_SOP_PUSH_GPREL,
9 kx BFD_RELOC_LARCH_SOP_PUSH_TLS_TPREL,
9 kx BFD_RELOC_LARCH_SOP_PUSH_TLS_GOT,
9 kx BFD_RELOC_LARCH_SOP_PUSH_TLS_GD,
9 kx BFD_RELOC_LARCH_SOP_PUSH_PLT_PCREL,
9 kx BFD_RELOC_LARCH_SOP_ASSERT,
9 kx BFD_RELOC_LARCH_SOP_NOT,
9 kx BFD_RELOC_LARCH_SOP_SUB,
9 kx BFD_RELOC_LARCH_SOP_SL,
9 kx BFD_RELOC_LARCH_SOP_SR,
9 kx BFD_RELOC_LARCH_SOP_ADD,
9 kx BFD_RELOC_LARCH_SOP_AND,
9 kx BFD_RELOC_LARCH_SOP_IF_ELSE,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_10_5,
9 kx BFD_RELOC_LARCH_SOP_POP_32_U_10_12,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_10_12,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_10_16,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_10_16_S2,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_5_20,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_0_5_10_16_S2,
9 kx BFD_RELOC_LARCH_SOP_POP_32_S_0_10_10_16_S2,
9 kx BFD_RELOC_LARCH_SOP_POP_32_U,
9 kx BFD_RELOC_LARCH_ADD8,
9 kx BFD_RELOC_LARCH_ADD16,
9 kx BFD_RELOC_LARCH_ADD24,
9 kx BFD_RELOC_LARCH_ADD32,
9 kx BFD_RELOC_LARCH_ADD64,
9 kx BFD_RELOC_LARCH_SUB8,
9 kx BFD_RELOC_LARCH_SUB16,
9 kx BFD_RELOC_LARCH_SUB24,
9 kx BFD_RELOC_LARCH_SUB32,
9 kx BFD_RELOC_LARCH_SUB64,
9 kx BFD_RELOC_LARCH_B16,
9 kx BFD_RELOC_LARCH_B21,
9 kx BFD_RELOC_LARCH_B26,
9 kx BFD_RELOC_LARCH_ABS_HI20,
9 kx BFD_RELOC_LARCH_ABS_LO12,
9 kx BFD_RELOC_LARCH_ABS64_LO20,
9 kx BFD_RELOC_LARCH_ABS64_HI12,
9 kx BFD_RELOC_LARCH_PCALA_HI20,
9 kx BFD_RELOC_LARCH_PCALA_LO12,
9 kx BFD_RELOC_LARCH_PCALA64_LO20,
9 kx BFD_RELOC_LARCH_PCALA64_HI12,
9 kx BFD_RELOC_LARCH_GOT_PC_HI20,
9 kx BFD_RELOC_LARCH_GOT_PC_LO12,
9 kx BFD_RELOC_LARCH_GOT64_PC_LO20,
9 kx BFD_RELOC_LARCH_GOT64_PC_HI12,
9 kx BFD_RELOC_LARCH_GOT_HI20,
9 kx BFD_RELOC_LARCH_GOT_LO12,
9 kx BFD_RELOC_LARCH_GOT64_LO20,
9 kx BFD_RELOC_LARCH_GOT64_HI12,
9 kx BFD_RELOC_LARCH_TLS_LE_HI20,
9 kx BFD_RELOC_LARCH_TLS_LE_LO12,
9 kx BFD_RELOC_LARCH_TLS_LE64_LO20,
9 kx BFD_RELOC_LARCH_TLS_LE64_HI12,
9 kx BFD_RELOC_LARCH_TLS_IE_PC_HI20,
9 kx BFD_RELOC_LARCH_TLS_IE_PC_LO12,
9 kx BFD_RELOC_LARCH_TLS_IE64_PC_LO20,
9 kx BFD_RELOC_LARCH_TLS_IE64_PC_HI12,
9 kx BFD_RELOC_LARCH_TLS_IE_HI20,
9 kx BFD_RELOC_LARCH_TLS_IE_LO12,
9 kx BFD_RELOC_LARCH_TLS_IE64_LO20,
9 kx BFD_RELOC_LARCH_TLS_IE64_HI12,
9 kx BFD_RELOC_LARCH_TLS_LD_PC_HI20,
9 kx BFD_RELOC_LARCH_TLS_LD_HI20,
9 kx BFD_RELOC_LARCH_TLS_GD_PC_HI20,
9 kx BFD_RELOC_LARCH_TLS_GD_HI20,
9 kx BFD_RELOC_LARCH_32_PCREL,
9 kx BFD_RELOC_LARCH_RELAX,
9 kx BFD_RELOC_UNUSED };
9 kx
9 kx typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
9 kx reloc_howto_type *bfd_reloc_type_lookup
9 kx (bfd *abfd, bfd_reloc_code_real_type code);
9 kx reloc_howto_type *bfd_reloc_name_lookup
9 kx (bfd *abfd, const char *reloc_name);
9 kx
9 kx const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
9 kx
9 kx /* Extracted from syms.c. */
9 kx
9 kx typedef struct bfd_symbol
9 kx {
9 kx /* A pointer to the BFD which owns the symbol. This information
9 kx is necessary so that a back end can work out what additional
9 kx information (invisible to the application writer) is carried
9 kx with the symbol.
9 kx
9 kx This field is *almost* redundant, since you can use section->owner
9 kx instead, except that some symbols point to the global sections
9 kx bfd_{abs,com,und}_section. This could be fixed by making
9 kx these globals be per-bfd (or per-target-flavor). FIXME. */
9 kx struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
9 kx
9 kx /* The text of the symbol. The name is left alone, and not copied; the
9 kx application may not alter it. */
9 kx const char *name;
9 kx
9 kx /* The value of the symbol. This really should be a union of a
9 kx numeric value with a pointer, since some flags indicate that
9 kx a pointer to another symbol is stored here. */
9 kx symvalue value;
9 kx
9 kx /* Attributes of a symbol. */
9 kx #define BSF_NO_FLAGS 0
9 kx
9 kx /* The symbol has local scope; <<static>> in <<C>>. The value
9 kx is the offset into the section of the data. */
9 kx #define BSF_LOCAL (1 << 0)
9 kx
9 kx /* The symbol has global scope; initialized data in <<C>>. The
9 kx value is the offset into the section of the data. */
9 kx #define BSF_GLOBAL (1 << 1)
9 kx
9 kx /* The symbol has global scope and is exported. The value is
9 kx the offset into the section of the data. */
9 kx #define BSF_EXPORT BSF_GLOBAL /* No real difference. */
9 kx
9 kx /* A normal C symbol would be one of:
9 kx <<BSF_LOCAL>>, <<BSF_UNDEFINED>> or <<BSF_GLOBAL>>. */
9 kx
9 kx /* The symbol is a debugging record. The value has an arbitrary
9 kx meaning, unless BSF_DEBUGGING_RELOC is also set. */
9 kx #define BSF_DEBUGGING (1 << 2)
9 kx
9 kx /* The symbol denotes a function entry point. Used in ELF,
9 kx perhaps others someday. */
9 kx #define BSF_FUNCTION (1 << 3)
9 kx
9 kx /* Used by the linker. */
9 kx #define BSF_KEEP (1 << 5)
9 kx
9 kx /* An ELF common symbol. */
9 kx #define BSF_ELF_COMMON (1 << 6)
9 kx
9 kx /* A weak global symbol, overridable without warnings by
9 kx a regular global symbol of the same name. */
9 kx #define BSF_WEAK (1 << 7)
9 kx
9 kx /* This symbol was created to point to a section, e.g. ELF's
9 kx STT_SECTION symbols. */
9 kx #define BSF_SECTION_SYM (1 << 8)
9 kx
9 kx /* The symbol used to be a common symbol, but now it is
9 kx allocated. */
9 kx #define BSF_OLD_COMMON (1 << 9)
9 kx
9 kx /* In some files the type of a symbol sometimes alters its
9 kx location in an output file - ie in coff a <<ISFCN>> symbol
9 kx which is also <<C_EXT>> symbol appears where it was
9 kx declared and not at the end of a section. This bit is set
9 kx by the target BFD part to convey this information. */
9 kx #define BSF_NOT_AT_END (1 << 10)
9 kx
9 kx /* Signal that the symbol is the label of constructor section. */
9 kx #define BSF_CONSTRUCTOR (1 << 11)
9 kx
9 kx /* Signal that the symbol is a warning symbol. The name is a
9 kx warning. The name of the next symbol is the one to warn about;
9 kx if a reference is made to a symbol with the same name as the next
9 kx symbol, a warning is issued by the linker. */
9 kx #define BSF_WARNING (1 << 12)
9 kx
9 kx /* Signal that the symbol is indirect. This symbol is an indirect
9 kx pointer to the symbol with the same name as the next symbol. */
9 kx #define BSF_INDIRECT (1 << 13)
9 kx
9 kx /* BSF_FILE marks symbols that contain a file name. This is used
9 kx for ELF STT_FILE symbols. */
9 kx #define BSF_FILE (1 << 14)
9 kx
9 kx /* Symbol is from dynamic linking information. */
9 kx #define BSF_DYNAMIC (1 << 15)
9 kx
9 kx /* The symbol denotes a data object. Used in ELF, and perhaps
9 kx others someday. */
9 kx #define BSF_OBJECT (1 << 16)
9 kx
9 kx /* This symbol is a debugging symbol. The value is the offset
9 kx into the section of the data. BSF_DEBUGGING should be set
9 kx as well. */
9 kx #define BSF_DEBUGGING_RELOC (1 << 17)
9 kx
9 kx /* This symbol is thread local. Used in ELF. */
9 kx #define BSF_THREAD_LOCAL (1 << 18)
9 kx
9 kx /* This symbol represents a complex relocation expression,
9 kx with the expression tree serialized in the symbol name. */
9 kx #define BSF_RELC (1 << 19)
9 kx
9 kx /* This symbol represents a signed complex relocation expression,
9 kx with the expression tree serialized in the symbol name. */
9 kx #define BSF_SRELC (1 << 20)
9 kx
9 kx /* This symbol was created by bfd_get_synthetic_symtab. */
9 kx #define BSF_SYNTHETIC (1 << 21)
9 kx
9 kx /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT.
9 kx The dynamic linker will compute the value of this symbol by
9 kx calling the function that it points to. BSF_FUNCTION must
9 kx also be also set. */
9 kx #define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
9 kx /* This symbol is a globally unique data object. The dynamic linker
9 kx will make sure that in the entire process there is just one symbol
9 kx with this name and type in use. BSF_OBJECT must also be set. */
9 kx #define BSF_GNU_UNIQUE (1 << 23)
9 kx
9 kx /* This section symbol should be included in the symbol table. */
9 kx #define BSF_SECTION_SYM_USED (1 << 24)
9 kx
9 kx flagword flags;
9 kx
9 kx /* A pointer to the section to which this symbol is
9 kx relative. This will always be non NULL, there are special
9 kx sections for undefined and absolute symbols. */
9 kx struct bfd_section *section;
9 kx
9 kx /* Back end special data. */
9 kx union
9 kx {
9 kx void *p;
9 kx bfd_vma i;
9 kx }
9 kx udata;
9 kx }
9 kx asymbol;
9 kx
9 kx #define bfd_get_symtab_upper_bound(abfd) \
9 kx BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
9 kx
9 kx bool bfd_is_local_label (bfd *abfd, asymbol *sym);
9 kx
9 kx bool bfd_is_local_label_name (bfd *abfd, const char *name);
9 kx
9 kx #define bfd_is_local_label_name(abfd, name) \
9 kx BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
9 kx
9 kx bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
9 kx
9 kx #define bfd_is_target_special_symbol(abfd, sym) \
9 kx BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
9 kx
9 kx #define bfd_canonicalize_symtab(abfd, location) \
9 kx BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
9 kx
9 kx bool bfd_set_symtab
9 kx (bfd *abfd, asymbol **location, unsigned int count);
9 kx
9 kx void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
9 kx
9 kx #define bfd_make_empty_symbol(abfd) \
9 kx BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
9 kx
9 kx asymbol *_bfd_generic_make_empty_symbol (bfd *);
9 kx
9 kx #define bfd_make_debug_symbol(abfd,ptr,size) \
9 kx BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
9 kx
9 kx int bfd_decode_symclass (asymbol *symbol);
9 kx
9 kx bool bfd_is_undefined_symclass (int symclass);
9 kx
9 kx void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
9 kx
9 kx bool bfd_copy_private_symbol_data
9 kx (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
9 kx
9 kx #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
9 kx BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
9 kx (ibfd, isymbol, obfd, osymbol))
9 kx
9 kx /* Extracted from bfd.c. */
9 kx
9 kx enum bfd_direction
9 kx {
9 kx no_direction = 0,
9 kx read_direction = 1,
9 kx write_direction = 2,
9 kx both_direction = 3
9 kx };
9 kx
9 kx enum bfd_plugin_format
9 kx {
9 kx bfd_plugin_unknown = 0,
9 kx bfd_plugin_yes = 1,
9 kx bfd_plugin_no = 2
9 kx };
9 kx
9 kx struct bfd_build_id
9 kx {
9 kx bfd_size_type size;
9 kx bfd_byte data[1];
9 kx };
9 kx
9 kx struct bfd
9 kx {
9 kx /* The filename the application opened the BFD with. */
9 kx const char *filename;
9 kx
9 kx /* A pointer to the target jump table. */
9 kx const struct bfd_target *xvec;
9 kx
9 kx /* The IOSTREAM, and corresponding IO vector that provide access
9 kx to the file backing the BFD. */
9 kx void *iostream;
9 kx const struct bfd_iovec *iovec;
9 kx
9 kx /* The caching routines use these to maintain a
9 kx least-recently-used list of BFDs. */
9 kx struct bfd *lru_prev, *lru_next;
9 kx
9 kx /* Track current file position (or current buffer offset for
9 kx in-memory BFDs). When a file is closed by the caching routines,
9 kx BFD retains state information on the file here. */
9 kx ufile_ptr where;
9 kx
9 kx /* File modified time, if mtime_set is TRUE. */
9 kx long mtime;
9 kx
9 kx /* A unique identifier of the BFD */
9 kx unsigned int id;
9 kx
9 kx /* Format_specific flags. */
9 kx flagword flags;
9 kx
9 kx /* Values that may appear in the flags field of a BFD. These also
9 kx appear in the object_flags field of the bfd_target structure, where
9 kx they indicate the set of flags used by that backend (not all flags
9 kx are meaningful for all object file formats) (FIXME: at the moment,
9 kx the object_flags values have mostly just been copied from backend
9 kx to another, and are not necessarily correct). */
9 kx
9 kx #define BFD_NO_FLAGS 0x0
9 kx
9 kx /* BFD contains relocation entries. */
9 kx #define HAS_RELOC 0x1
9 kx
9 kx /* BFD is directly executable. */
9 kx #define EXEC_P 0x2
9 kx
9 kx /* BFD has line number information (basically used for F_LNNO in a
9 kx COFF header). */
9 kx #define HAS_LINENO 0x4
9 kx
9 kx /* BFD has debugging information. */
9 kx #define HAS_DEBUG 0x08
9 kx
9 kx /* BFD has symbols. */
9 kx #define HAS_SYMS 0x10
9 kx
9 kx /* BFD has local symbols (basically used for F_LSYMS in a COFF
9 kx header). */
9 kx #define HAS_LOCALS 0x20
9 kx
9 kx /* BFD is a dynamic object. */
9 kx #define DYNAMIC 0x40
9 kx
9 kx /* Text section is write protected (if D_PAGED is not set, this is
9 kx like an a.out NMAGIC file) (the linker sets this by default, but
9 kx clears it for -r or -N). */
9 kx #define WP_TEXT 0x80
9 kx
9 kx /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
9 kx linker sets this by default, but clears it for -r or -n or -N). */
9 kx #define D_PAGED 0x100
9 kx
9 kx /* BFD is relaxable (this means that bfd_relax_section may be able to
9 kx do something) (sometimes bfd_relax_section can do something even if
9 kx this is not set). */
9 kx #define BFD_IS_RELAXABLE 0x200
9 kx
9 kx /* This may be set before writing out a BFD to request using a
9 kx traditional format. For example, this is used to request that when
9 kx writing out an a.out object the symbols not be hashed to eliminate
9 kx duplicates. */
9 kx #define BFD_TRADITIONAL_FORMAT 0x400
9 kx
9 kx /* This flag indicates that the BFD contents are actually cached
9 kx in memory. If this is set, iostream points to a bfd_in_memory
9 kx struct. */
9 kx #define BFD_IN_MEMORY 0x800
9 kx
9 kx /* This BFD has been created by the linker and doesn't correspond
9 kx to any input file. */
9 kx #define BFD_LINKER_CREATED 0x1000
9 kx
9 kx /* This may be set before writing out a BFD to request that it
9 kx be written using values for UIDs, GIDs, timestamps, etc. that
9 kx will be consistent from run to run. */
9 kx #define BFD_DETERMINISTIC_OUTPUT 0x2000
9 kx
9 kx /* Compress sections in this BFD. */
9 kx #define BFD_COMPRESS 0x4000
9 kx
9 kx /* Decompress sections in this BFD. */
9 kx #define BFD_DECOMPRESS 0x8000
9 kx
9 kx /* BFD is a dummy, for plugins. */
9 kx #define BFD_PLUGIN 0x10000
9 kx
9 kx /* Compress sections in this BFD with SHF_COMPRESSED from gABI. */
9 kx #define BFD_COMPRESS_GABI 0x20000
9 kx
9 kx /* Convert ELF common symbol type to STT_COMMON or STT_OBJECT in this
9 kx BFD. */
9 kx #define BFD_CONVERT_ELF_COMMON 0x40000
9 kx
9 kx /* Use the ELF STT_COMMON type in this BFD. */
9 kx #define BFD_USE_ELF_STT_COMMON 0x80000
9 kx
9 kx /* Put pathnames into archives (non-POSIX). */
9 kx #define BFD_ARCHIVE_FULL_PATH 0x100000
9 kx
9 kx #define BFD_CLOSED_BY_CACHE 0x200000
9 kx /* Compress sections in this BFD with SHF_COMPRESSED zstd. */
9 kx #define BFD_COMPRESS_ZSTD 0x400000
9 kx
9 kx /* Flags bits to be saved in bfd_preserve_save. */
9 kx #define BFD_FLAGS_SAVED \
9 kx (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
9 kx | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
9 kx | BFD_USE_ELF_STT_COMMON | BFD_COMPRESS_ZSTD)
9 kx
9 kx /* Flags bits which are for BFD use only. */
9 kx #define BFD_FLAGS_FOR_BFD_USE_MASK \
9 kx (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
9 kx | BFD_PLUGIN | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT \
9 kx | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
9 kx
9 kx /* The format which belongs to the BFD. (object, core, etc.) */
9 kx ENUM_BITFIELD (bfd_format) format : 3;
9 kx
9 kx /* The direction with which the BFD was opened. */
9 kx ENUM_BITFIELD (bfd_direction) direction : 2;
9 kx
9 kx /* Is the file descriptor being cached? That is, can it be closed as
9 kx needed, and re-opened when accessed later? */
9 kx unsigned int cacheable : 1;
9 kx
9 kx /* Marks whether there was a default target specified when the
9 kx BFD was opened. This is used to select which matching algorithm
9 kx to use to choose the back end. */
9 kx unsigned int target_defaulted : 1;
9 kx
9 kx /* ... and here: (``once'' means at least once). */
9 kx unsigned int opened_once : 1;
9 kx
9 kx /* Set if we have a locally maintained mtime value, rather than
9 kx getting it from the file each time. */
9 kx unsigned int mtime_set : 1;
9 kx
9 kx /* Flag set if symbols from this BFD should not be exported. */
9 kx unsigned int no_export : 1;
9 kx
9 kx /* Remember when output has begun, to stop strange things
9 kx from happening. */
9 kx unsigned int output_has_begun : 1;
9 kx
9 kx /* Have archive map. */
9 kx unsigned int has_armap : 1;
9 kx
9 kx /* Set if this is a thin archive. */
9 kx unsigned int is_thin_archive : 1;
9 kx
9 kx /* Set if this archive should not cache element positions. */
9 kx unsigned int no_element_cache : 1;
9 kx
9 kx /* Set if only required symbols should be added in the link hash table for
9 kx this object. Used by VMS linkers. */
9 kx unsigned int selective_search : 1;
9 kx
9 kx /* Set if this is the linker output BFD. */
9 kx unsigned int is_linker_output : 1;
9 kx
9 kx /* Set if this is the linker input BFD. */
9 kx unsigned int is_linker_input : 1;
9 kx
9 kx /* If this is an input for a compiler plug-in library. */
9 kx ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
9 kx
9 kx /* Set if this is a plugin output file. */
9 kx unsigned int lto_output : 1;
9 kx
9 kx /* Set if this is a slim LTO object not loaded with a compiler plugin. */
9 kx unsigned int lto_slim_object : 1;
9 kx
9 kx /* Do not attempt to modify this file. Set when detecting errors
9 kx that BFD is not prepared to handle for objcopy/strip. */
9 kx unsigned int read_only : 1;
9 kx
9 kx /* Set to dummy BFD created when claimed by a compiler plug-in
9 kx library. */
9 kx bfd *plugin_dummy_bfd;
9 kx
9 kx /* The offset of this bfd in the file, typically 0 if it is not
9 kx contained in an archive. */
9 kx ufile_ptr origin;
9 kx
9 kx /* The origin in the archive of the proxy entry. This will
9 kx normally be the same as origin, except for thin archives,
9 kx when it will contain the current offset of the proxy in the
9 kx thin archive rather than the offset of the bfd in its actual
9 kx container. */
9 kx ufile_ptr proxy_origin;
9 kx
9 kx /* A hash table for section names. */
9 kx struct bfd_hash_table section_htab;
9 kx
9 kx /* Pointer to linked list of sections. */
9 kx struct bfd_section *sections;
9 kx
9 kx /* The last section on the section list. */
9 kx struct bfd_section *section_last;
9 kx
9 kx /* The number of sections. */
9 kx unsigned int section_count;
9 kx
9 kx /* The archive plugin file descriptor. */
9 kx int archive_plugin_fd;
9 kx
9 kx /* The number of opens on the archive plugin file descriptor. */
9 kx unsigned int archive_plugin_fd_open_count;
9 kx
9 kx /* A field used by _bfd_generic_link_add_archive_symbols. This will
9 kx be used only for archive elements. */
9 kx int archive_pass;
9 kx
9 kx /* The total size of memory from bfd_alloc. */
9 kx bfd_size_type alloc_size;
9 kx
9 kx /* Stuff only useful for object files:
9 kx The start address. */
9 kx bfd_vma start_address;
9 kx
9 kx /* Symbol table for output BFD (with symcount entries).
9 kx Also used by the linker to cache input BFD symbols. */
9 kx struct bfd_symbol **outsymbols;
9 kx
9 kx /* Used for input and output. */
9 kx unsigned int symcount;
9 kx
9 kx /* Used for slurped dynamic symbol tables. */
9 kx unsigned int dynsymcount;
9 kx
9 kx /* Pointer to structure which contains architecture information. */
9 kx const struct bfd_arch_info *arch_info;
9 kx
9 kx /* Cached length of file for bfd_get_size. 0 until bfd_get_size is
9 kx called, 1 if stat returns an error or the file size is too large to
9 kx return in ufile_ptr. Both 0 and 1 should be treated as "unknown". */
9 kx ufile_ptr size;
9 kx
9 kx /* Stuff only useful for archives. */
9 kx void *arelt_data;
9 kx struct bfd *my_archive; /* The containing archive BFD. */
9 kx struct bfd *archive_next; /* The next BFD in the archive. */
9 kx struct bfd *archive_head; /* The first BFD in the archive. */
9 kx struct bfd *nested_archives; /* List of nested archive in a flattened
9 kx thin archive. */
9 kx
9 kx union {
9 kx /* For input BFDs, a chain of BFDs involved in a link. */
9 kx struct bfd *next;
9 kx /* For output BFD, the linker hash table. */
9 kx struct bfd_link_hash_table *hash;
9 kx } link;
9 kx
9 kx /* Used by the back end to hold private data. */
9 kx union
9 kx {
9 kx struct aout_data_struct *aout_data;
9 kx struct artdata *aout_ar_data;
9 kx struct coff_tdata *coff_obj_data;
9 kx struct pe_tdata *pe_obj_data;
9 kx struct xcoff_tdata *xcoff_obj_data;
9 kx struct ecoff_tdata *ecoff_obj_data;
9 kx struct srec_data_struct *srec_data;
9 kx struct verilog_data_struct *verilog_data;
9 kx struct ihex_data_struct *ihex_data;
9 kx struct tekhex_data_struct *tekhex_data;
9 kx struct elf_obj_tdata *elf_obj_data;
9 kx struct mmo_data_struct *mmo_data;
9 kx struct sun_core_struct *sun_core_data;
9 kx struct sco5_core_struct *sco5_core_data;
9 kx struct trad_core_struct *trad_core_data;
9 kx struct som_data_struct *som_data;
9 kx struct hpux_core_struct *hpux_core_data;
9 kx struct hppabsd_core_struct *hppabsd_core_data;
9 kx struct sgi_core_struct *sgi_core_data;
9 kx struct lynx_core_struct *lynx_core_data;
9 kx struct osf_core_struct *osf_core_data;
9 kx struct cisco_core_struct *cisco_core_data;
9 kx struct versados_data_struct *versados_data;
9 kx struct netbsd_core_struct *netbsd_core_data;
9 kx struct mach_o_data_struct *mach_o_data;
9 kx struct mach_o_fat_data_struct *mach_o_fat_data;
9 kx struct plugin_data_struct *plugin_data;
9 kx struct bfd_pef_data_struct *pef_data;
9 kx struct bfd_pef_xlib_data_struct *pef_xlib_data;
9 kx struct bfd_sym_data_struct *sym_data;
9 kx void *any;
9 kx }
9 kx tdata;
9 kx
9 kx /* Used by the application to hold private data. */
9 kx void *usrdata;
9 kx
9 kx /* Where all the allocated stuff under this BFD goes. This is a
9 kx struct objalloc *, but we use void * to avoid requiring the inclusion
9 kx of objalloc.h. */
9 kx void *memory;
9 kx
9 kx /* For input BFDs, the build ID, if the object has one. */
9 kx const struct bfd_build_id *build_id;
9 kx };
9 kx
9 kx static inline const char *
9 kx bfd_get_filename (const bfd *abfd)
9 kx {
9 kx return abfd->filename;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_get_cacheable (const bfd *abfd)
9 kx {
9 kx return abfd->cacheable;
9 kx }
9 kx
9 kx static inline enum bfd_format
9 kx bfd_get_format (const bfd *abfd)
9 kx {
9 kx return abfd->format;
9 kx }
9 kx
9 kx static inline flagword
9 kx bfd_get_file_flags (const bfd *abfd)
9 kx {
9 kx return abfd->flags;
9 kx }
9 kx
9 kx static inline bfd_vma
9 kx bfd_get_start_address (const bfd *abfd)
9 kx {
9 kx return abfd->start_address;
9 kx }
9 kx
9 kx static inline unsigned int
9 kx bfd_get_symcount (const bfd *abfd)
9 kx {
9 kx return abfd->symcount;
9 kx }
9 kx
9 kx static inline unsigned int
9 kx bfd_get_dynamic_symcount (const bfd *abfd)
9 kx {
9 kx return abfd->dynsymcount;
9 kx }
9 kx
9 kx static inline struct bfd_symbol **
9 kx bfd_get_outsymbols (const bfd *abfd)
9 kx {
9 kx return abfd->outsymbols;
9 kx }
9 kx
9 kx static inline unsigned int
9 kx bfd_count_sections (const bfd *abfd)
9 kx {
9 kx return abfd->section_count;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_has_map (const bfd *abfd)
9 kx {
9 kx return abfd->has_armap;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_is_thin_archive (const bfd *abfd)
9 kx {
9 kx return abfd->is_thin_archive;
9 kx }
9 kx
9 kx static inline void *
9 kx bfd_usrdata (const bfd *abfd)
9 kx {
9 kx return abfd->usrdata;
9 kx }
9 kx
9 kx /* See note beside bfd_set_section_userdata. */
9 kx static inline bool
9 kx bfd_set_cacheable (bfd * abfd, bool val)
9 kx {
9 kx abfd->cacheable = val;
9 kx return true;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_set_thin_archive (bfd *abfd, bool val)
9 kx {
9 kx abfd->is_thin_archive = val;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_set_usrdata (bfd *abfd, void *val)
9 kx {
9 kx abfd->usrdata = val;
9 kx }
9 kx
9 kx static inline asection *
9 kx bfd_asymbol_section (const asymbol *sy)
9 kx {
9 kx return sy->section;
9 kx }
9 kx
9 kx static inline bfd_vma
9 kx bfd_asymbol_value (const asymbol *sy)
9 kx {
9 kx return sy->section->vma + sy->value;
9 kx }
9 kx
9 kx static inline const char *
9 kx bfd_asymbol_name (const asymbol *sy)
9 kx {
9 kx return sy->name;
9 kx }
9 kx
9 kx static inline struct bfd *
9 kx bfd_asymbol_bfd (const asymbol *sy)
9 kx {
9 kx return sy->the_bfd;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_set_asymbol_name (asymbol *sy, const char *name)
9 kx {
9 kx sy->name = name;
9 kx }
9 kx
9 kx /* For input sections return the original size on disk of the
9 kx section. For output sections return the current size. */
9 kx static inline bfd_size_type
9 kx bfd_get_section_limit_octets (const bfd *abfd, const asection *sec)
9 kx {
9 kx if (abfd->direction != write_direction && sec->rawsize != 0)
9 kx return sec->rawsize;
9 kx return sec->size;
9 kx }
9 kx
9 kx /* Find the address one past the end of SEC. */
9 kx static inline bfd_size_type
9 kx bfd_get_section_limit (const bfd *abfd, const asection *sec)
9 kx {
9 kx return (bfd_get_section_limit_octets (abfd, sec)
9 kx / bfd_octets_per_byte (abfd, sec));
9 kx }
9 kx
9 kx /* For input sections return the larger of the current size and the
9 kx original size on disk of the section. For output sections return
9 kx the current size. */
9 kx static inline bfd_size_type
9 kx bfd_get_section_alloc_size (const bfd *abfd, const asection *sec)
9 kx {
9 kx if (abfd->direction != write_direction && sec->rawsize > sec->size)
9 kx return sec->rawsize;
9 kx return sec->size;
9 kx }
9 kx
9 kx /* Functions to handle insertion and deletion of a bfd's sections. These
9 kx only handle the list pointers, ie. do not adjust section_count,
9 kx target_index etc. */
9 kx static inline void
9 kx bfd_section_list_remove (bfd *abfd, asection *s)
9 kx {
9 kx asection *next = s->next;
9 kx asection *prev = s->prev;
9 kx if (prev)
9 kx prev->next = next;
9 kx else
9 kx abfd->sections = next;
9 kx if (next)
9 kx next->prev = prev;
9 kx else
9 kx abfd->section_last = prev;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_section_list_append (bfd *abfd, asection *s)
9 kx {
9 kx s->next = 0;
9 kx if (abfd->section_last)
9 kx {
9 kx s->prev = abfd->section_last;
9 kx abfd->section_last->next = s;
9 kx }
9 kx else
9 kx {
9 kx s->prev = 0;
9 kx abfd->sections = s;
9 kx }
9 kx abfd->section_last = s;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_section_list_prepend (bfd *abfd, asection *s)
9 kx {
9 kx s->prev = 0;
9 kx if (abfd->sections)
9 kx {
9 kx s->next = abfd->sections;
9 kx abfd->sections->prev = s;
9 kx }
9 kx else
9 kx {
9 kx s->next = 0;
9 kx abfd->section_last = s;
9 kx }
9 kx abfd->sections = s;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_section_list_insert_after (bfd *abfd, asection *a, asection *s)
9 kx {
9 kx asection *next = a->next;
9 kx s->next = next;
9 kx s->prev = a;
9 kx a->next = s;
9 kx if (next)
9 kx next->prev = s;
9 kx else
9 kx abfd->section_last = s;
9 kx }
9 kx
9 kx static inline void
9 kx bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s)
9 kx {
9 kx asection *prev = b->prev;
9 kx s->prev = prev;
9 kx s->next = b;
9 kx b->prev = s;
9 kx if (prev)
9 kx prev->next = s;
9 kx else
9 kx abfd->sections = s;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_section_removed_from_list (const bfd *abfd, const asection *s)
9 kx {
9 kx return s->next ? s->next->prev != s : abfd->section_last != s;
9 kx }
9 kx
9 kx
9 kx typedef enum bfd_error
9 kx {
9 kx bfd_error_no_error = 0,
9 kx bfd_error_system_call,
9 kx bfd_error_invalid_target,
9 kx bfd_error_wrong_format,
9 kx bfd_error_wrong_object_format,
9 kx bfd_error_invalid_operation,
9 kx bfd_error_no_memory,
9 kx bfd_error_no_symbols,
9 kx bfd_error_no_armap,
9 kx bfd_error_no_more_archived_files,
9 kx bfd_error_malformed_archive,
9 kx bfd_error_missing_dso,
9 kx bfd_error_file_not_recognized,
9 kx bfd_error_file_ambiguously_recognized,
9 kx bfd_error_no_contents,
9 kx bfd_error_nonrepresentable_section,
9 kx bfd_error_no_debug_section,
9 kx bfd_error_bad_value,
9 kx bfd_error_file_truncated,
9 kx bfd_error_file_too_big,
9 kx bfd_error_sorry,
9 kx bfd_error_on_input,
9 kx bfd_error_invalid_error_code
9 kx }
9 kx bfd_error_type;
9 kx
9 kx bfd_error_type bfd_get_error (void);
9 kx
9 kx void bfd_set_error (bfd_error_type error_tag);
9 kx
9 kx void bfd_set_input_error (bfd *input, bfd_error_type error_tag);
9 kx
9 kx const char *bfd_errmsg (bfd_error_type error_tag);
9 kx
9 kx void bfd_perror (const char *message);
9 kx
9 kx
9 kx typedef void (*bfd_error_handler_type) (const char *, va_list);
9 kx
9 kx void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
9 kx
9 kx bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
9 kx
9 kx void bfd_set_error_program_name (const char *);
9 kx
9 kx
9 kx typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg,
9 kx const char *bfd_version,
9 kx const char *bfd_file,
9 kx int bfd_line);
9 kx
9 kx bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type);
9 kx
9 kx long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
9 kx
9 kx long bfd_canonicalize_reloc
9 kx (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
9 kx
9 kx void bfd_set_reloc
9 kx (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
9 kx
9 kx #define bfd_set_reloc(abfd, asect, location, count) \
9 kx BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
9 kx bool bfd_set_file_flags (bfd *abfd, flagword flags);
9 kx
9 kx int bfd_get_arch_size (bfd *abfd);
9 kx
9 kx int bfd_get_sign_extend_vma (bfd *abfd);
9 kx
9 kx bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
9 kx
9 kx unsigned int bfd_get_gp_size (bfd *abfd);
9 kx
9 kx void bfd_set_gp_size (bfd *abfd, unsigned int i);
9 kx
9 kx void bfd_set_gp_value (bfd *abfd, bfd_vma v);
9 kx
9 kx bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
9 kx
9 kx bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
9 kx
9 kx #define bfd_copy_private_header_data(ibfd, obfd) \
9 kx BFD_SEND (obfd, _bfd_copy_private_header_data, \
9 kx (ibfd, obfd))
9 kx bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
9 kx
9 kx #define bfd_copy_private_bfd_data(ibfd, obfd) \
9 kx BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
9 kx (ibfd, obfd))
9 kx bool bfd_set_private_flags (bfd *abfd, flagword flags);
9 kx
9 kx #define bfd_set_private_flags(abfd, flags) \
9 kx BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
9 kx #define bfd_sizeof_headers(abfd, info) \
9 kx BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
9 kx
9 kx #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
9 kx BFD_SEND (abfd, _bfd_find_nearest_line, \
9 kx (abfd, syms, sec, off, file, func, line, NULL))
9 kx
9 kx #define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \
9 kx file, func, line, disc) \
9 kx BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \
9 kx (abfd, alt_filename, syms, sec, off, file, func, line, disc))
9 kx
9 kx #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
9 kx line, disc) \
9 kx BFD_SEND (abfd, _bfd_find_nearest_line, \
9 kx (abfd, syms, sec, off, file, func, line, disc))
9 kx
9 kx #define bfd_find_line(abfd, syms, sym, file, line) \
9 kx BFD_SEND (abfd, _bfd_find_line, \
9 kx (abfd, syms, sym, file, line))
9 kx
9 kx #define bfd_find_inliner_info(abfd, file, func, line) \
9 kx BFD_SEND (abfd, _bfd_find_inliner_info, \
9 kx (abfd, file, func, line))
9 kx
9 kx #define bfd_debug_info_start(abfd) \
9 kx BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
9 kx
9 kx #define bfd_debug_info_end(abfd) \
9 kx BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
9 kx
9 kx #define bfd_debug_info_accumulate(abfd, section) \
9 kx BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
9 kx
9 kx #define bfd_stat_arch_elt(abfd, stat) \
9 kx BFD_SEND (abfd->my_archive ? abfd->my_archive : abfd, \
9 kx _bfd_stat_arch_elt, (abfd, stat))
9 kx
9 kx #define bfd_update_armap_timestamp(abfd) \
9 kx BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
9 kx
9 kx #define bfd_set_arch_mach(abfd, arch, mach)\
9 kx BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
9 kx
9 kx #define bfd_relax_section(abfd, section, link_info, again) \
9 kx BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
9 kx
9 kx #define bfd_gc_sections(abfd, link_info) \
9 kx BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
9 kx
9 kx #define bfd_lookup_section_flags(link_info, flag_info, section) \
9 kx BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info, section))
9 kx
9 kx #define bfd_merge_sections(abfd, link_info) \
9 kx BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
9 kx
9 kx #define bfd_is_group_section(abfd, sec) \
9 kx BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
9 kx
9 kx #define bfd_group_name(abfd, sec) \
9 kx BFD_SEND (abfd, _bfd_group_name, (abfd, sec))
9 kx
9 kx #define bfd_discard_group(abfd, sec) \
9 kx BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
9 kx
9 kx #define bfd_link_hash_table_create(abfd) \
9 kx BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
9 kx
9 kx #define bfd_link_add_symbols(abfd, info) \
9 kx BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
9 kx
9 kx #define bfd_link_just_syms(abfd, sec, info) \
9 kx BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
9 kx
9 kx #define bfd_final_link(abfd, info) \
9 kx BFD_SEND (abfd, _bfd_final_link, (abfd, info))
9 kx
9 kx #define bfd_free_cached_info(abfd) \
9 kx BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
9 kx
9 kx #define bfd_get_dynamic_symtab_upper_bound(abfd) \
9 kx BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
9 kx
9 kx #define bfd_print_private_bfd_data(abfd, file)\
9 kx BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
9 kx
9 kx #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
9 kx BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
9 kx
9 kx #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
9 kx BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
9 kx dyncount, dynsyms, ret))
9 kx
9 kx #define bfd_get_dynamic_reloc_upper_bound(abfd) \
9 kx BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
9 kx
9 kx #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
9 kx BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
9 kx
9 kx extern bfd_byte *bfd_get_relocated_section_contents
9 kx (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
9 kx bool, asymbol **);
9 kx
9 kx bool bfd_alt_mach_code (bfd *abfd, int alternative);
9 kx
9 kx bfd_vma bfd_emul_get_maxpagesize (const char *);
9 kx
9 kx bfd_vma bfd_emul_get_commonpagesize (const char *);
9 kx
9 kx char *bfd_demangle (bfd *, const char *, int);
9 kx
9 kx /* Extracted from archive.c. */
9 kx symindex bfd_get_next_mapent
9 kx (bfd *abfd, symindex previous, carsym **sym);
9 kx
9 kx bool bfd_set_archive_head (bfd *output, bfd *new_head);
9 kx
9 kx bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
9 kx
9 kx /* Extracted from corefile.c. */
9 kx const char *bfd_core_file_failing_command (bfd *abfd);
9 kx
9 kx int bfd_core_file_failing_signal (bfd *abfd);
9 kx
9 kx int bfd_core_file_pid (bfd *abfd);
9 kx
9 kx bool core_file_matches_executable_p
9 kx (bfd *core_bfd, bfd *exec_bfd);
9 kx
9 kx bool generic_core_file_matches_executable_p
9 kx (bfd *core_bfd, bfd *exec_bfd);
9 kx
9 kx /* Extracted from targets.c. */
9 kx #define BFD_SEND(bfd, message, arglist) \
9 kx ((*((bfd)->xvec->message)) arglist)
9 kx
9 kx #ifdef DEBUG_BFD_SEND
9 kx #undef BFD_SEND
9 kx #define BFD_SEND(bfd, message, arglist) \
9 kx (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
9 kx ((*((bfd)->xvec->message)) arglist) : \
9 kx (bfd_assert (__FILE__,__LINE__), NULL))
9 kx #endif
9 kx #define BFD_SEND_FMT(bfd, message, arglist) \
9 kx (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
9 kx
9 kx #ifdef DEBUG_BFD_SEND
9 kx #undef BFD_SEND_FMT
9 kx #define BFD_SEND_FMT(bfd, message, arglist) \
9 kx (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
9 kx (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
9 kx (bfd_assert (__FILE__,__LINE__), NULL))
9 kx #endif
9 kx
9 kx /* Defined to TRUE if unused section symbol should be kept. */
9 kx #ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
9 kx #define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
9 kx #endif
9 kx
9 kx enum bfd_flavour
9 kx {
9 kx /* N.B. Update bfd_flavour_name if you change this. */
9 kx bfd_target_unknown_flavour,
9 kx bfd_target_aout_flavour,
9 kx bfd_target_coff_flavour,
9 kx bfd_target_ecoff_flavour,
9 kx bfd_target_xcoff_flavour,
9 kx bfd_target_elf_flavour,
9 kx bfd_target_tekhex_flavour,
9 kx bfd_target_srec_flavour,
9 kx bfd_target_verilog_flavour,
9 kx bfd_target_ihex_flavour,
9 kx bfd_target_som_flavour,
9 kx bfd_target_os9k_flavour,
9 kx bfd_target_versados_flavour,
9 kx bfd_target_msdos_flavour,
9 kx bfd_target_ovax_flavour,
9 kx bfd_target_evax_flavour,
9 kx bfd_target_mmo_flavour,
9 kx bfd_target_mach_o_flavour,
9 kx bfd_target_pef_flavour,
9 kx bfd_target_pef_xlib_flavour,
9 kx bfd_target_sym_flavour
9 kx };
9 kx
9 kx enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
9 kx
9 kx /* Forward declaration. */
9 kx typedef struct bfd_link_info _bfd_link_info;
9 kx
9 kx /* Forward declaration. */
9 kx typedef struct flag_info flag_info;
9 kx
9 kx typedef void (*bfd_cleanup) (bfd *);
9 kx
9 kx typedef struct bfd_target
9 kx {
9 kx /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
9 kx const char *name;
9 kx
9 kx /* The "flavour" of a back end is a general indication about
9 kx the contents of a file. */
9 kx enum bfd_flavour flavour;
9 kx
9 kx /* The order of bytes within the data area of a file. */
9 kx enum bfd_endian byteorder;
9 kx
9 kx /* The order of bytes within the header parts of a file. */
9 kx enum bfd_endian header_byteorder;
9 kx
9 kx /* A mask of all the flags which an executable may have set -
9 kx from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. */
9 kx flagword object_flags;
9 kx
9 kx /* A mask of all the flags which a section may have set - from
9 kx the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. */
9 kx flagword section_flags;
9 kx
9 kx /* The character normally found at the front of a symbol.
9 kx (if any), perhaps `_'. */
9 kx char symbol_leading_char;
9 kx
9 kx /* The pad character for file names within an archive header. */
9 kx char ar_pad_char;
9 kx
9 kx /* The maximum number of characters in an archive header. */
9 kx unsigned char ar_max_namelen;
9 kx
9 kx /* How well this target matches, used to select between various
9 kx possible targets when more than one target matches. */
9 kx unsigned char match_priority;
9 kx
9 kx /* TRUE if unused section symbols should be kept. */
9 kx bool keep_unused_section_symbols;
9 kx
9 kx /* Entries for byte swapping for data. These are different from the
9 kx other entry points, since they don't take a BFD as the first argument.
9 kx Certain other handlers could do the same. */
9 kx uint64_t (*bfd_getx64) (const void *);
9 kx int64_t (*bfd_getx_signed_64) (const void *);
9 kx void (*bfd_putx64) (uint64_t, void *);
9 kx bfd_vma (*bfd_getx32) (const void *);
9 kx bfd_signed_vma (*bfd_getx_signed_32) (const void *);
9 kx void (*bfd_putx32) (bfd_vma, void *);
9 kx bfd_vma (*bfd_getx16) (const void *);
9 kx bfd_signed_vma (*bfd_getx_signed_16) (const void *);
9 kx void (*bfd_putx16) (bfd_vma, void *);
9 kx
9 kx /* Byte swapping for the headers. */
9 kx uint64_t (*bfd_h_getx64) (const void *);
9 kx int64_t (*bfd_h_getx_signed_64) (const void *);
9 kx void (*bfd_h_putx64) (uint64_t, void *);
9 kx bfd_vma (*bfd_h_getx32) (const void *);
9 kx bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
9 kx void (*bfd_h_putx32) (bfd_vma, void *);
9 kx bfd_vma (*bfd_h_getx16) (const void *);
9 kx bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
9 kx void (*bfd_h_putx16) (bfd_vma, void *);
9 kx
9 kx /* Format dependent routines: these are vectors of entry points
9 kx within the target vector structure, one for each format to check. */
9 kx
9 kx /* Check the format of a file being read. Return a <<bfd_cleanup>> on
9 kx success or zero on failure. */
9 kx bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *);
9 kx
9 kx /* Set the format of a file being written. */
9 kx bool (*_bfd_set_format[bfd_type_end]) (bfd *);
9 kx
9 kx /* Write cached information into a file being written, at <<bfd_close>>. */
9 kx bool (*_bfd_write_contents[bfd_type_end]) (bfd *);
9 kx
9 kx
9 kx /* Generic entry points. */
9 kx #define BFD_JUMP_TABLE_GENERIC(NAME) \
9 kx NAME##_close_and_cleanup, \
9 kx NAME##_bfd_free_cached_info, \
9 kx NAME##_new_section_hook, \
9 kx NAME##_get_section_contents, \
9 kx NAME##_get_section_contents_in_window
9 kx
9 kx /* Called when the BFD is being closed to do any necessary cleanup. */
9 kx bool (*_close_and_cleanup) (bfd *);
9 kx /* Ask the BFD to free all cached information. */
9 kx bool (*_bfd_free_cached_info) (bfd *);
9 kx /* Called when a new section is created. */
9 kx bool (*_new_section_hook) (bfd *, sec_ptr);
9 kx /* Read the contents of a section. */
9 kx bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
9 kx bfd_size_type);
9 kx bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *,
9 kx file_ptr, bfd_size_type);
9 kx
9 kx /* Entry points to copy private data. */
9 kx #define BFD_JUMP_TABLE_COPY(NAME) \
9 kx NAME##_bfd_copy_private_bfd_data, \
9 kx NAME##_bfd_merge_private_bfd_data, \
9 kx _bfd_generic_init_private_section_data, \
9 kx NAME##_bfd_copy_private_section_data, \
9 kx NAME##_bfd_copy_private_symbol_data, \
9 kx NAME##_bfd_copy_private_header_data, \
9 kx NAME##_bfd_set_private_flags, \
9 kx NAME##_bfd_print_private_bfd_data
9 kx
9 kx /* Called to copy BFD general private data from one object file
9 kx to another. */
9 kx bool (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
9 kx /* Called to merge BFD general private data from one object file
9 kx to a common output file when linking. */
9 kx bool (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
9 kx /* Called to initialize BFD private section data from one object file
9 kx to another. */
9 kx #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
9 kx BFD_SEND (obfd, _bfd_init_private_section_data, \
9 kx (ibfd, isec, obfd, osec, link_info))
9 kx bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr,
9 kx struct bfd_link_info *);
9 kx /* Called to copy BFD private section data from one object file
9 kx to another. */
9 kx bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr);
9 kx /* Called to copy BFD private symbol data from one symbol
9 kx to another. */
9 kx bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *,
9 kx bfd *, asymbol *);
9 kx /* Called to copy BFD private header data from one object file
9 kx to another. */
9 kx bool (*_bfd_copy_private_header_data) (bfd *, bfd *);
9 kx /* Called to set private backend flags. */
9 kx bool (*_bfd_set_private_flags) (bfd *, flagword);
9 kx
9 kx /* Called to print private BFD data. */
9 kx bool (*_bfd_print_private_bfd_data) (bfd *, void *);
9 kx
9 kx /* Core file entry points. */
9 kx #define BFD_JUMP_TABLE_CORE(NAME) \
9 kx NAME##_core_file_failing_command, \
9 kx NAME##_core_file_failing_signal, \
9 kx NAME##_core_file_matches_executable_p, \
9 kx NAME##_core_file_pid
9 kx
9 kx char *(*_core_file_failing_command) (bfd *);
9 kx int (*_core_file_failing_signal) (bfd *);
9 kx bool (*_core_file_matches_executable_p) (bfd *, bfd *);
9 kx int (*_core_file_pid) (bfd *);
9 kx
9 kx /* Archive entry points. */
9 kx #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
9 kx NAME##_slurp_armap, \
9 kx NAME##_slurp_extended_name_table, \
9 kx NAME##_construct_extended_name_table, \
9 kx NAME##_truncate_arname, \
9 kx NAME##_write_armap, \
9 kx NAME##_read_ar_hdr, \
9 kx NAME##_write_ar_hdr, \
9 kx NAME##_openr_next_archived_file, \
9 kx NAME##_get_elt_at_index, \
9 kx NAME##_generic_stat_arch_elt, \
9 kx NAME##_update_armap_timestamp
9 kx
9 kx bool (*_bfd_slurp_armap) (bfd *);
9 kx bool (*_bfd_slurp_extended_name_table) (bfd *);
9 kx bool (*_bfd_construct_extended_name_table) (bfd *, char **,
9 kx bfd_size_type *,
9 kx const char **);
9 kx void (*_bfd_truncate_arname) (bfd *, const char *, char *);
9 kx bool (*write_armap) (bfd *, unsigned, struct orl *, unsigned, int);
9 kx void *(*_bfd_read_ar_hdr_fn) (bfd *);
9 kx bool (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
9 kx bfd *(*openr_next_archived_file) (bfd *, bfd *);
9 kx #define bfd_get_elt_at_index(b,i) \
9 kx BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
9 kx bfd *(*_bfd_get_elt_at_index) (bfd *, symindex);
9 kx int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
9 kx bool (*_bfd_update_armap_timestamp) (bfd *);
9 kx
9 kx /* Entry points used for symbols. */
9 kx #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
9 kx NAME##_get_symtab_upper_bound, \
9 kx NAME##_canonicalize_symtab, \
9 kx NAME##_make_empty_symbol, \
9 kx NAME##_print_symbol, \
9 kx NAME##_get_symbol_info, \
9 kx NAME##_get_symbol_version_string, \
9 kx NAME##_bfd_is_local_label_name, \
9 kx NAME##_bfd_is_target_special_symbol, \
9 kx NAME##_get_lineno, \
9 kx NAME##_find_nearest_line, \
9 kx NAME##_find_nearest_line_with_alt, \
9 kx NAME##_find_line, \
9 kx NAME##_find_inliner_info, \
9 kx NAME##_bfd_make_debug_symbol, \
9 kx NAME##_read_minisymbols, \
9 kx NAME##_minisymbol_to_symbol
9 kx
9 kx long (*_bfd_get_symtab_upper_bound) (bfd *);
9 kx long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **);
9 kx struct bfd_symbol *
9 kx (*_bfd_make_empty_symbol) (bfd *);
9 kx void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *,
9 kx bfd_print_symbol_type);
9 kx #define bfd_print_symbol(b,p,s,e) \
9 kx BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
9 kx void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *);
9 kx #define bfd_get_symbol_info(b,p,e) \
9 kx BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
9 kx const char *
9 kx (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
9 kx bool, bool *);
9 kx #define bfd_get_symbol_version_string(b,s,p,h) \
9 kx BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h))
9 kx bool (*_bfd_is_local_label_name) (bfd *, const char *);
9 kx bool (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
9 kx alent *
9 kx (*_get_lineno) (bfd *, struct bfd_symbol *);
9 kx bool (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
9 kx struct bfd_section *, bfd_vma,
9 kx const char **, const char **,
9 kx unsigned int *, unsigned int *);
9 kx bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *,
9 kx struct bfd_symbol **,
9 kx struct bfd_section *, bfd_vma,
9 kx const char **, const char **,
9 kx unsigned int *, unsigned int *);
9 kx bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
9 kx struct bfd_symbol *, const char **,
9 kx unsigned int *);
9 kx bool (*_bfd_find_inliner_info)
9 kx (bfd *, const char **, const char **, unsigned int *);
9 kx /* Back-door to allow format-aware applications to create debug symbols
9 kx while using BFD for everything else. Currently used by the assembler
9 kx when creating COFF files. */
9 kx asymbol *
9 kx (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
9 kx #define bfd_read_minisymbols(b, d, m, s) \
9 kx BFD_SEND (b, _read_minisymbols, (b, d, m, s))
9 kx long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *);
9 kx #define bfd_minisymbol_to_symbol(b, d, m, f) \
9 kx BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
9 kx asymbol *
9 kx (*_minisymbol_to_symbol) (bfd *, bool, const void *, asymbol *);
9 kx
9 kx /* Routines for relocs. */
9 kx #define BFD_JUMP_TABLE_RELOCS(NAME) \
9 kx NAME##_get_reloc_upper_bound, \
9 kx NAME##_canonicalize_reloc, \
9 kx NAME##_set_reloc, \
9 kx NAME##_bfd_reloc_type_lookup, \
9 kx NAME##_bfd_reloc_name_lookup
9 kx
9 kx long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
9 kx long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **,
9 kx struct bfd_symbol **);
9 kx void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int);
9 kx /* See documentation on reloc types. */
9 kx reloc_howto_type *
9 kx (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
9 kx reloc_howto_type *
9 kx (*reloc_name_lookup) (bfd *, const char *);
9 kx
9 kx /* Routines used when writing an object file. */
9 kx #define BFD_JUMP_TABLE_WRITE(NAME) \
9 kx NAME##_set_arch_mach, \
9 kx NAME##_set_section_contents
9 kx
9 kx bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
9 kx unsigned long);
9 kx bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
9 kx file_ptr, bfd_size_type);
9 kx
9 kx /* Routines used by the linker. */
9 kx #define BFD_JUMP_TABLE_LINK(NAME) \
9 kx NAME##_sizeof_headers, \
9 kx NAME##_bfd_get_relocated_section_contents, \
9 kx NAME##_bfd_relax_section, \
9 kx NAME##_bfd_link_hash_table_create, \
9 kx NAME##_bfd_link_add_symbols, \
9 kx NAME##_bfd_link_just_syms, \
9 kx NAME##_bfd_copy_link_hash_symbol_type, \
9 kx NAME##_bfd_final_link, \
9 kx NAME##_bfd_link_split_section, \
9 kx NAME##_bfd_link_check_relocs, \
9 kx NAME##_bfd_gc_sections, \
9 kx NAME##_bfd_lookup_section_flags, \
9 kx NAME##_bfd_merge_sections, \
9 kx NAME##_bfd_is_group_section, \
9 kx NAME##_bfd_group_name, \
9 kx NAME##_bfd_discard_group, \
9 kx NAME##_section_already_linked, \
9 kx NAME##_bfd_define_common_symbol, \
9 kx NAME##_bfd_link_hide_symbol, \
9 kx NAME##_bfd_define_start_stop
9 kx
9 kx int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
9 kx bfd_byte *
9 kx (*_bfd_get_relocated_section_contents) (bfd *,
9 kx struct bfd_link_info *,
9 kx struct bfd_link_order *,
9 kx bfd_byte *, bool,
9 kx struct bfd_symbol **);
9 kx
9 kx bool (*_bfd_relax_section) (bfd *, struct bfd_section *,
9 kx struct bfd_link_info *, bool *);
9 kx
9 kx /* Create a hash table for the linker. Different backends store
9 kx different information in this table. */
9 kx struct bfd_link_hash_table *
9 kx (*_bfd_link_hash_table_create) (bfd *);
9 kx
9 kx /* Add symbols from this object file into the hash table. */
9 kx bool (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
9 kx
9 kx /* Indicate that we are only retrieving symbol values from this section. */
9 kx void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
9 kx
9 kx /* Copy the symbol type and other attributes for a linker script
9 kx assignment of one symbol to another. */
9 kx #define bfd_copy_link_hash_symbol_type(b, t, f) \
9 kx BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
9 kx void (*_bfd_copy_link_hash_symbol_type) (bfd *,
9 kx struct bfd_link_hash_entry *,
9 kx struct bfd_link_hash_entry *);
9 kx
9 kx /* Do a link based on the link_order structures attached to each
9 kx section of the BFD. */
9 kx bool (*_bfd_final_link) (bfd *, struct bfd_link_info *);
9 kx
9 kx /* Should this section be split up into smaller pieces during linking. */
9 kx bool (*_bfd_link_split_section) (bfd *, struct bfd_section *);
9 kx
9 kx /* Check the relocations in the bfd for validity. */
9 kx bool (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
9 kx
9 kx /* Remove sections that are not referenced from the output. */
9 kx bool (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
9 kx
9 kx /* Sets the bitmask of allowed and disallowed section flags. */
9 kx bool (*_bfd_lookup_section_flags) (struct bfd_link_info *,
9 kx struct flag_info *, asection *);
9 kx
9 kx /* Attempt to merge SEC_MERGE sections. */
9 kx bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
9 kx
9 kx /* Is this section a member of a group? */
9 kx bool (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
9 kx
9 kx /* The group name, if section is a member of a group. */
9 kx const char *(*_bfd_group_name) (bfd *, const struct bfd_section *);
9 kx
9 kx /* Discard members of a group. */
9 kx bool (*_bfd_discard_group) (bfd *, struct bfd_section *);
9 kx
9 kx /* Check if SEC has been already linked during a reloceatable or
9 kx final link. */
9 kx bool (*_section_already_linked) (bfd *, asection *,
9 kx struct bfd_link_info *);
9 kx
9 kx /* Define a common symbol. */
9 kx bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
9 kx struct bfd_link_hash_entry *);
9 kx
9 kx /* Hide a symbol. */
9 kx void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *,
9 kx struct bfd_link_hash_entry *);
9 kx
9 kx /* Define a __start, __stop, .startof. or .sizeof. symbol. */
9 kx struct bfd_link_hash_entry *
9 kx (*_bfd_define_start_stop) (struct bfd_link_info *, const char *,
9 kx asection *);
9 kx
9 kx /* Routines to handle dynamic symbols and relocs. */
9 kx #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
9 kx NAME##_get_dynamic_symtab_upper_bound, \
9 kx NAME##_canonicalize_dynamic_symtab, \
9 kx NAME##_get_synthetic_symtab, \
9 kx NAME##_get_dynamic_reloc_upper_bound, \
9 kx NAME##_canonicalize_dynamic_reloc
9 kx
9 kx /* Get the amount of memory required to hold the dynamic symbols. */
9 kx long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
9 kx /* Read in the dynamic symbols. */
9 kx long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **);
9 kx /* Create synthetized symbols. */
9 kx long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **,
9 kx long, struct bfd_symbol **,
9 kx struct bfd_symbol **);
9 kx /* Get the amount of memory required to hold the dynamic relocs. */
9 kx long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
9 kx /* Read in the dynamic relocs. */
9 kx long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **,
9 kx struct bfd_symbol **);
9 kx
9 kx /* Opposite endian version of this target. */
9 kx const struct bfd_target *alternative_target;
9 kx
9 kx /* Data for use by back-end routines, which isn't
9 kx generic enough to belong in this structure. */
9 kx const void *backend_data;
9 kx
9 kx } bfd_target;
9 kx
9 kx static inline const char *
9 kx bfd_get_target (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->name;
9 kx }
9 kx
9 kx static inline enum bfd_flavour
9 kx bfd_get_flavour (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->flavour;
9 kx }
9 kx
9 kx static inline flagword
9 kx bfd_applicable_file_flags (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->object_flags;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_family_coff (const bfd *abfd)
9 kx {
9 kx return (bfd_get_flavour (abfd) == bfd_target_coff_flavour
9 kx || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_big_endian (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->byteorder == BFD_ENDIAN_BIG;
9 kx }
9 kx static inline bool
9 kx bfd_little_endian (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_header_big_endian (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_header_little_endian (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE;
9 kx }
9 kx
9 kx static inline flagword
9 kx bfd_applicable_section_flags (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->section_flags;
9 kx }
9 kx
9 kx static inline char
9 kx bfd_get_symbol_leading_char (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->symbol_leading_char;
9 kx }
9 kx
9 kx static inline enum bfd_flavour
9 kx bfd_asymbol_flavour (const asymbol *sy)
9 kx {
9 kx if ((sy->flags & BSF_SYNTHETIC) != 0)
9 kx return bfd_target_unknown_flavour;
9 kx return sy->the_bfd->xvec->flavour;
9 kx }
9 kx
9 kx static inline bool
9 kx bfd_keep_unused_section_symbols (const bfd *abfd)
9 kx {
9 kx return abfd->xvec->keep_unused_section_symbols;
9 kx }
9 kx
9 kx /* Cached _bfd_check_format messages are put in this. */
9 kx struct per_xvec_message
9 kx {
9 kx struct per_xvec_message *next;
9 kx char message[];
9 kx };
9 kx
9 kx bool bfd_set_default_target (const char *name);
9 kx
9 kx const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
9 kx
9 kx const bfd_target *bfd_get_target_info (const char *target_name,
9 kx bfd *abfd,
9 kx bool *is_bigendian,
9 kx int *underscoring,
9 kx const char **def_target_arch);
9 kx const char ** bfd_target_list (void);
9 kx
9 kx const bfd_target *bfd_iterate_over_targets
9 kx (int (*func) (const bfd_target *, void *),
9 kx void *data);
9 kx
9 kx const char *bfd_flavour_name (enum bfd_flavour flavour);
9 kx
9 kx /* Extracted from format.c. */
9 kx bool bfd_check_format (bfd *abfd, bfd_format format);
9 kx
9 kx bool bfd_check_format_matches
9 kx (bfd *abfd, bfd_format format, char ***matching);
9 kx
9 kx bool bfd_set_format (bfd *abfd, bfd_format format);
9 kx
9 kx const char *bfd_format_string (bfd_format format);
9 kx
9 kx /* Extracted from linker.c. */
9 kx /* Return TRUE if the symbol described by a linker hash entry H
9 kx is going to be absolute. Linker-script defined symbols can be
9 kx converted from absolute to section-relative ones late in the
9 kx link. Use this macro to correctly determine whether the symbol
9 kx will actually end up absolute in output. */
9 kx #define bfd_is_abs_symbol(H) \
9 kx (((H)->type == bfd_link_hash_defined \
9 kx || (H)->type == bfd_link_hash_defweak) \
9 kx && bfd_is_abs_section ((H)->u.def.section) \
9 kx && !(H)->rel_from_abs)
9 kx
9 kx bool bfd_link_split_section (bfd *abfd, asection *sec);
9 kx
9 kx #define bfd_link_split_section(abfd, sec) \
9 kx BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
9 kx
9 kx bool bfd_section_already_linked (bfd *abfd,
9 kx asection *sec,
9 kx struct bfd_link_info *info);
9 kx
9 kx #define bfd_section_already_linked(abfd, sec, info) \
9 kx BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
9 kx
9 kx bool bfd_generic_define_common_symbol
9 kx (bfd *output_bfd, struct bfd_link_info *info,
9 kx struct bfd_link_hash_entry *h);
9 kx
9 kx #define bfd_define_common_symbol(output_bfd, info, h) \
9 kx BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
9 kx
9 kx void _bfd_generic_link_hide_symbol
9 kx (bfd *output_bfd, struct bfd_link_info *info,
9 kx struct bfd_link_hash_entry *h);
9 kx
9 kx #define bfd_link_hide_symbol(output_bfd, info, h) \
9 kx BFD_SEND (output_bfd, _bfd_link_hide_symbol, (output_bfd, info, h))
9 kx
9 kx struct bfd_link_hash_entry *bfd_generic_define_start_stop
9 kx (struct bfd_link_info *info,
9 kx const char *symbol, asection *sec);
9 kx
9 kx #define bfd_define_start_stop(output_bfd, info, symbol, sec) \
9 kx BFD_SEND (output_bfd, _bfd_define_start_stop, (info, symbol, sec))
9 kx
9 kx struct bfd_elf_version_tree * bfd_find_version_for_sym
9 kx (struct bfd_elf_version_tree *verdefs,
9 kx const char *sym_name, bool *hide);
9 kx
9 kx bool bfd_hide_sym_by_version
9 kx (struct bfd_elf_version_tree *verdefs, const char *sym_name);
9 kx
9 kx bool bfd_link_check_relocs
9 kx (bfd *abfd, struct bfd_link_info *info);
9 kx
9 kx bool _bfd_generic_link_check_relocs
9 kx (bfd *abfd, struct bfd_link_info *info);
9 kx
9 kx bool bfd_merge_private_bfd_data
9 kx (bfd *ibfd, struct bfd_link_info *info);
9 kx
9 kx #define bfd_merge_private_bfd_data(ibfd, info) \
9 kx BFD_SEND ((info)->output_bfd, _bfd_merge_private_bfd_data, \
9 kx (ibfd, info))
9 kx /* Extracted from simple.c. */
9 kx bfd_byte *bfd_simple_get_relocated_section_contents
9 kx (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
9 kx
9 kx /* Extracted from compress.c. */
9 kx /* Types of compressed DWARF debug sections. */
9 kx enum compressed_debug_section_type
9 kx {
9 kx COMPRESS_DEBUG_NONE = 0,
9 kx COMPRESS_DEBUG_GNU_ZLIB = 1 << 1,
9 kx COMPRESS_DEBUG_GABI_ZLIB = 1 << 2,
9 kx COMPRESS_DEBUG_ZSTD = 1 << 3,
9 kx COMPRESS_UNKNOWN = 1 << 4
9 kx };
9 kx
9 kx /* Tuple for compressed_debug_section_type and their name. */
9 kx struct compressed_type_tuple
9 kx {
9 kx enum compressed_debug_section_type type;
9 kx const char *name;
9 kx };
9 kx
9 kx /* Compression header ch_type values. */
9 kx enum compression_type
9 kx {
9 kx ch_none = 0,
9 kx ch_compress_zlib = 1 , /* Compressed with zlib. */
9 kx ch_compress_zstd = 2 /* Compressed with zstd (www.zstandard.org). */
9 kx };
9 kx
9 kx static inline char *
9 kx bfd_debug_name_to_zdebug (bfd *abfd, const char *name)
9 kx {
9 kx size_t len = strlen (name);
9 kx char *new_name = (char *) bfd_alloc (abfd, len + 2);
9 kx if (new_name == NULL)
9 kx return NULL;
9 kx new_name[0] = '.';
9 kx new_name[1] = 'z';
9 kx memcpy (new_name + 2, name + 1, len);
9 kx return new_name;
9 kx }
9 kx
9 kx static inline char *
9 kx bfd_zdebug_name_to_debug (bfd *abfd, const char *name)
9 kx {
9 kx size_t len = strlen (name);
9 kx char *new_name = (char *) bfd_alloc (abfd, len);
9 kx if (new_name == NULL)
9 kx return NULL;
9 kx new_name[0] = '.';
9 kx memcpy (new_name + 1, name + 2, len - 1);
9 kx return new_name;
9 kx }
9 kx
9 kx enum compressed_debug_section_type
9 kx bfd_get_compression_algorithm (const char *name);
9 kx const char *bfd_get_compression_algorithm_name
9 kx (enum compressed_debug_section_type type);
9 kx void bfd_update_compression_header
9 kx (bfd *abfd, bfd_byte *contents, asection *sec);
9 kx
9 kx int bfd_get_compression_header_size (bfd *abfd, asection *sec);
9 kx
9 kx bool bfd_convert_section_setup
9 kx (bfd *ibfd, asection *isec, bfd *obfd,
9 kx const char **new_name, bfd_size_type *new_size);
9 kx
9 kx bool bfd_convert_section_contents
9 kx (bfd *ibfd, asection *isec, bfd *obfd,
9 kx bfd_byte **ptr, bfd_size_type *ptr_size);
9 kx
9 kx bool bfd_get_full_section_contents
9 kx (bfd *abfd, asection *section, bfd_byte **ptr);
9 kx
9 kx bool bfd_is_section_compressed_info
9 kx (bfd *abfd, asection *section,
9 kx int *compression_header_size_p,
9 kx bfd_size_type *uncompressed_size_p,
9 kx unsigned int *uncompressed_alignment_power_p,
9 kx enum compression_type *ch_type);
9 kx
9 kx bool bfd_is_section_compressed
9 kx (bfd *abfd, asection *section);
9 kx
9 kx bool bfd_init_section_decompress_status
9 kx (bfd *abfd, asection *section);
9 kx
9 kx bool bfd_init_section_compress_status
9 kx (bfd *abfd, asection *section);
9 kx
9 kx bool bfd_compress_section
9 kx (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
9 kx
9 kx #ifdef __cplusplus
9 kx }
9 kx #endif
9 kx #endif