/* The word size of the default bfd target. */
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
-#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
-
#include <inttypes.h>
#if BFD_ARCH_SIZE >= 64
#ifdef BFD64
-typedef uint64_t bfd_vma;
-typedef int64_t bfd_signed_vma;
-typedef uint64_t bfd_size_type;
-typedef uint64_t symvalue;
-
-#if BFD_HOST_64BIT_LONG
-#define BFD_VMA_FMT "l"
-#elif defined (__MSVCRT__)
-#define BFD_VMA_FMT "I64"
-#else
-#define BFD_VMA_FMT "ll"
-#endif
-
-#ifndef fprintf_vma
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#endif
-
-#else /* not BFD64 */
-
/* Represent a target address. Also used as a generic unsigned type
which is guaranteed to be big enough to hold any arithmetic types
we need to deal with. */
-typedef unsigned long bfd_vma;
+typedef uint64_t bfd_vma;
/* A generic signed type which is guaranteed to be big enough to hold any
arithmetic types we need to deal with. Can be assumed to be compatible
with bfd_vma in the same way that signed and unsigned ints are compatible
(as parameters, in assignment, etc). */
-typedef long bfd_signed_vma;
+typedef int64_t bfd_signed_vma;
+
+typedef uint64_t bfd_size_type;
+typedef uint64_t symvalue;
+
+#else /* not BFD64 */
+typedef unsigned long bfd_vma;
+typedef long bfd_signed_vma;
typedef unsigned long symvalue;
typedef unsigned long bfd_size_type;
-/* Print a bfd_vma x on stream s. */
-#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
#endif /* not BFD64 */
#define HALF_BFD_SIZE_TYPE \
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-#define printf_vma(x) fprintf_vma(stdout,x)
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
static inline bool
bfd_set_section_alignment (asection *sec, unsigned int val)
{
+ if (val >= sizeof (bfd_vma) * 8 - 1)
+ return false;
sec->alignment_power = val;
return true;
}
#define bfd_mach_msp46 46
#define bfd_mach_msp47 47
#define bfd_mach_msp54 54
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
bfd_arch_xgate, /* Freescale XGATE. */
#define bfd_mach_xgate 1
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
/* Unsupported relocation size requested. */
bfd_reloc_notsupported,
- /* Unused. */
+ /* Target specific meaning. */
bfd_reloc_other,
/* The symbol to relocate against was undefined. */
BFD_RELOC_RELC,
-/* Infineon Relocations. */
- BFD_RELOC_XC16X_PAG,
- BFD_RELOC_XC16X_POF,
- BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF,
-
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_LARCH_SUB24,
BFD_RELOC_LARCH_SUB32,
BFD_RELOC_LARCH_SUB64,
+ BFD_RELOC_LARCH_B16,
+ BFD_RELOC_LARCH_B21,
+ BFD_RELOC_LARCH_B26,
+ BFD_RELOC_LARCH_ABS_HI20,
+ BFD_RELOC_LARCH_ABS_LO12,
+ BFD_RELOC_LARCH_ABS64_LO20,
+ BFD_RELOC_LARCH_ABS64_HI12,
+ BFD_RELOC_LARCH_PCALA_HI20,
+ BFD_RELOC_LARCH_PCALA_LO12,
+ BFD_RELOC_LARCH_PCALA64_LO20,
+ BFD_RELOC_LARCH_PCALA64_HI12,
+ BFD_RELOC_LARCH_GOT_PC_HI20,
+ BFD_RELOC_LARCH_GOT_PC_LO12,
+ BFD_RELOC_LARCH_GOT64_PC_LO20,
+ BFD_RELOC_LARCH_GOT64_PC_HI12,
+ BFD_RELOC_LARCH_GOT_HI20,
+ BFD_RELOC_LARCH_GOT_LO12,
+ BFD_RELOC_LARCH_GOT64_LO20,
+ BFD_RELOC_LARCH_GOT64_HI12,
+ BFD_RELOC_LARCH_TLS_LE_HI20,
+ BFD_RELOC_LARCH_TLS_LE_LO12,
+ BFD_RELOC_LARCH_TLS_LE64_LO20,
+ BFD_RELOC_LARCH_TLS_LE64_HI12,
+ BFD_RELOC_LARCH_TLS_IE_PC_HI20,
+ BFD_RELOC_LARCH_TLS_IE_PC_LO12,
+ BFD_RELOC_LARCH_TLS_IE64_PC_LO20,
+ BFD_RELOC_LARCH_TLS_IE64_PC_HI12,
+ BFD_RELOC_LARCH_TLS_IE_HI20,
+ BFD_RELOC_LARCH_TLS_IE_LO12,
+ BFD_RELOC_LARCH_TLS_IE64_LO20,
+ BFD_RELOC_LARCH_TLS_IE64_HI12,
+ BFD_RELOC_LARCH_TLS_LD_PC_HI20,
+ BFD_RELOC_LARCH_TLS_LD_HI20,
+ BFD_RELOC_LARCH_TLS_GD_PC_HI20,
+ BFD_RELOC_LARCH_TLS_GD_HI20,
+ BFD_RELOC_LARCH_32_PCREL,
+ BFD_RELOC_LARCH_RELAX,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
/* Put pathnames into archives (non-POSIX). */
#define BFD_ARCHIVE_FULL_PATH 0x100000
+#define BFD_CLOSED_BY_CACHE 0x200000
+
/* Flags bits to be saved in bfd_preserve_save. */
#define BFD_FLAGS_SAVED \
(BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
BFD_SEND (abfd, _bfd_find_nearest_line, \
(abfd, syms, sec, off, file, func, line, NULL))
+#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \
+ file, func, line, disc) \
+ BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \
+ (abfd, alt_filename, syms, sec, off, file, func, line, disc))
+
#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
line, disc) \
BFD_SEND (abfd, _bfd_find_nearest_line, \
NAME##_bfd_is_target_special_symbol, \
NAME##_get_lineno, \
NAME##_find_nearest_line, \
+ NAME##_find_nearest_line_with_alt, \
NAME##_find_line, \
NAME##_find_inliner_info, \
NAME##_bfd_make_debug_symbol, \
struct bfd_section *, bfd_vma,
const char **, const char **,
unsigned int *, unsigned int *);
+ bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *,
+ struct bfd_symbol **,
+ struct bfd_section *, bfd_vma,
+ const char **, const char **,
+ unsigned int *, unsigned int *);
bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
struct bfd_symbol *, const char **,
unsigned int *);