X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fbfd-in2.h;h=b79fa5c88da0cc38165e0827757ed66a0e1b3b6b;hb=cf869cce6215e2b8cc0daeccf06ace32d3798bd6;hp=087eff89036c3006851555305bba4d8226882fff;hpb=a9dc948127c2cb5127cec5ca87dbc19f17dd16cf;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 087eff8903..b79fa5c88d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -135,26 +135,17 @@ typedef BFD_HOST_64_BIT bfd_signed_vma; typedef BFD_HOST_U_64_BIT bfd_size_type; typedef BFD_HOST_U_64_BIT symvalue; -#ifndef fprintf_vma #if BFD_HOST_64BIT_LONG -#define sprintf_vma(s,x) sprintf (s, "%016lx", x) -#define fprintf_vma(f,x) fprintf (f, "%016lx", x) -#elif BFD_HOST_64BIT_LONG_LONG -#ifndef __MSVCRT__ -#define sprintf_vma(s,x) sprintf (s, "%016llx", x) -#define fprintf_vma(f,x) fprintf (f, "%016llx", x) -#else -#define sprintf_vma(s,x) sprintf (s, "%016I64x", x) -#define fprintf_vma(f,x) fprintf (f, "%016I64x", x) -#endif +#define BFD_VMA_FMT "l" +#elif defined (__MSVCRT__) +#define BFD_VMA_FMT "I64" #else -#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff))) -#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) -#define fprintf_vma(s,x) \ - fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x)) -#define sprintf_vma(s,x) \ - sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x)) +#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 */ @@ -174,8 +165,9 @@ typedef unsigned long symvalue; typedef unsigned long bfd_size_type; /* Print a bfd_vma x on stream s. */ -#define fprintf_vma(s,x) fprintf (s, "%08lx", x) -#define sprintf_vma(s,x) sprintf (s, "%08lx", x) +#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 */ @@ -728,6 +720,10 @@ extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); +extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, + char **); + /* SunOS shared library support routines for the linker. */ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list @@ -1797,6 +1793,8 @@ enum bfd_architecture #define bfd_mach_mips9000 9000 #define bfd_mach_mips10000 10000 #define bfd_mach_mips12000 12000 +#define bfd_mach_mips14000 14000 +#define bfd_mach_mips16000 16000 #define bfd_mach_mips16 16 #define bfd_mach_mips5 5 #define bfd_mach_mips_loongson_2e 3001 @@ -1979,9 +1977,13 @@ enum bfd_architecture bfd_arch_avr, /* Atmel AVR microcontrollers. */ #define bfd_mach_avr1 1 #define bfd_mach_avr2 2 +#define bfd_mach_avr25 25 #define bfd_mach_avr3 3 +#define bfd_mach_avr31 31 +#define bfd_mach_avr35 35 #define bfd_mach_avr4 4 #define bfd_mach_avr5 5 +#define bfd_mach_avr51 51 #define bfd_mach_avr6 6 bfd_arch_bfin, /* ADI Blackfin */ #define bfd_mach_bfin 1 @@ -2033,6 +2035,8 @@ enum bfd_architecture #define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ #define bfd_mach_z80full 7 /* All undocumented instructions. */ #define bfd_mach_r800 11 /* R800: successor with multiplication. */ + bfd_arch_lm32, /* Lattice Mico32 */ +#define bfd_mach_lm32 1 bfd_arch_last }; @@ -2359,6 +2363,21 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_68K_GLOB_DAT, BFD_RELOC_68K_JMP_SLOT, BFD_RELOC_68K_RELATIVE, + BFD_RELOC_68K_TLS_GD32, + BFD_RELOC_68K_TLS_GD16, + BFD_RELOC_68K_TLS_GD8, + BFD_RELOC_68K_TLS_LDM32, + BFD_RELOC_68K_TLS_LDM16, + BFD_RELOC_68K_TLS_LDM8, + BFD_RELOC_68K_TLS_LDO32, + BFD_RELOC_68K_TLS_LDO16, + BFD_RELOC_68K_TLS_LDO8, + BFD_RELOC_68K_TLS_IE32, + BFD_RELOC_68K_TLS_IE16, + BFD_RELOC_68K_TLS_IE8, + BFD_RELOC_68K_TLS_LE32, + BFD_RELOC_68K_TLS_LE16, + BFD_RELOC_68K_TLS_LE8, /* Linkage-table relative. */ BFD_RELOC_32_BASEREL, @@ -2612,6 +2631,11 @@ to compensate for the borrow when the low bits are added. */ /* Low 16 bits of pc-relative value */ BFD_RELOC_LO16_PCREL, +/* Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of +16-bit immediate fields */ + BFD_RELOC_MIPS16_GOT16, + BFD_RELOC_MIPS16_CALL16, + /* MIPS16 high 16 bits of 32-bit value. */ BFD_RELOC_MIPS16_HI16, @@ -2664,7 +2688,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_TLS_TPREL_LO16, -/* MIPS ELF relocations (VxWorks extensions). */ +/* MIPS ELF relocations (VxWorks and PLT extensions). */ BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT, @@ -4128,6 +4152,9 @@ This is the 5 bits of a value. */ BFD_RELOC_CR16_SWITCH8, BFD_RELOC_CR16_SWITCH16, BFD_RELOC_CR16_SWITCH32, + BFD_RELOC_CR16_GOT_REGREL20, + BFD_RELOC_CR16_GOTC_REGREL20, + BFD_RELOC_CR16_GLOB_DAT, /* NS CRX Relocations. */ BFD_RELOC_CRX_REL4, @@ -4191,6 +4218,20 @@ This is the 5 bits of a value. */ /* 32-bit offset to symbol with PLT entry, relative to this relocation. */ BFD_RELOC_CRIS_32_PLT_PCREL, +/* Relocs used in TLS code for CRIS. */ + BFD_RELOC_CRIS_32_GOT_GD, + BFD_RELOC_CRIS_16_GOT_GD, + BFD_RELOC_CRIS_32_GD, + BFD_RELOC_CRIS_DTP, + BFD_RELOC_CRIS_32_DTPREL, + BFD_RELOC_CRIS_16_DTPREL, + BFD_RELOC_CRIS_32_GOT_TPREL, + BFD_RELOC_CRIS_16_GOT_TPREL, + BFD_RELOC_CRIS_32_TPREL, + BFD_RELOC_CRIS_16_TPREL, + BFD_RELOC_CRIS_DTPMOD, + BFD_RELOC_CRIS_32_IE, + /* Intel i860 Relocations. */ BFD_RELOC_860_COPY, BFD_RELOC_860_GLOB_DAT, @@ -4368,6 +4409,15 @@ internally by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND. */ BFD_RELOC_XTENSA_ASM_SIMPLIFY, +/* Xtensa TLS relocations. */ + BFD_RELOC_XTENSA_TLSDESC_FN, + BFD_RELOC_XTENSA_TLSDESC_ARG, + BFD_RELOC_XTENSA_TLS_DTPOFF, + BFD_RELOC_XTENSA_TLS_TPOFF, + BFD_RELOC_XTENSA_TLS_FUNC, + BFD_RELOC_XTENSA_TLS_ARG, + BFD_RELOC_XTENSA_TLS_CALL, + /* 8 bit signed offset in (ix+d) or (iy+d). */ BFD_RELOC_Z80_DISP8, @@ -4379,6 +4429,17 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ /* 4 bit value. */ BFD_RELOC_Z8K_IMM4L, + +/* Lattice Mico32 relocations. */ + BFD_RELOC_LM32_CALL, + BFD_RELOC_LM32_BRANCH, + BFD_RELOC_LM32_16_GOT, + BFD_RELOC_LM32_GOTOFF_HI16, + BFD_RELOC_LM32_GOTOFF_LO16, + BFD_RELOC_LM32_COPY, + BFD_RELOC_LM32_GLOB_DAT, + BFD_RELOC_LM32_JMP_SLOT, + BFD_RELOC_LM32_RELATIVE, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type *bfd_reloc_type_lookup @@ -4413,100 +4474,97 @@ typedef struct bfd_symbol symvalue value; /* Attributes of a symbol. */ -#define BSF_NO_FLAGS 0x00 +#define BSF_NO_FLAGS 0x00 /* The symbol has local scope; <> in <>. The value is the offset into the section of the data. */ -#define BSF_LOCAL 0x01 +#define BSF_LOCAL (1 << 0) /* The symbol has global scope; initialized data in <>. The value is the offset into the section of the data. */ -#define BSF_GLOBAL 0x02 +#define BSF_GLOBAL (1 << 1) /* The symbol has global scope and is exported. The value is the offset into the section of the data. */ #define BSF_EXPORT BSF_GLOBAL /* No real difference. */ /* A normal C symbol would be one of: - <>, <>, <> or + <>, <>, <> or <>. */ /* The symbol is a debugging record. The value has an arbitrary meaning, unless BSF_DEBUGGING_RELOC is also set. */ -#define BSF_DEBUGGING 0x08 +#define BSF_DEBUGGING (1 << 2) /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ -#define BSF_FUNCTION 0x10 +#define BSF_FUNCTION (1 << 3) /* Used by the linker. */ -#define BSF_KEEP 0x20 -#define BSF_KEEP_G 0x40 +#define BSF_KEEP (1 << 5) +#define BSF_KEEP_G (1 << 6) /* A weak global symbol, overridable without warnings by a regular global symbol of the same name. */ -#define BSF_WEAK 0x80 +#define BSF_WEAK (1 << 7) /* This symbol was created to point to a section, e.g. ELF's STT_SECTION symbols. */ -#define BSF_SECTION_SYM 0x100 +#define BSF_SECTION_SYM (1 << 8) /* The symbol used to be a common symbol, but now it is allocated. */ -#define BSF_OLD_COMMON 0x200 - - /* The default value for common data. */ -#define BFD_FORT_COMM_DEFAULT_VALUE 0 +#define BSF_OLD_COMMON (1 << 9) /* In some files the type of a symbol sometimes alters its location in an output file - ie in coff a <> symbol which is also <> symbol appears where it was declared and not at the end of a section. This bit is set by the target BFD part to convey this information. */ -#define BSF_NOT_AT_END 0x400 +#define BSF_NOT_AT_END (1 << 10) /* Signal that the symbol is the label of constructor section. */ -#define BSF_CONSTRUCTOR 0x800 +#define BSF_CONSTRUCTOR (1 << 11) /* Signal that the symbol is a warning symbol. The name is a warning. The name of the next symbol is the one to warn about; if a reference is made to a symbol with the same name as the next symbol, a warning is issued by the linker. */ -#define BSF_WARNING 0x1000 +#define BSF_WARNING (1 << 12) /* Signal that the symbol is indirect. This symbol is an indirect pointer to the symbol with the same name as the next symbol. */ -#define BSF_INDIRECT 0x2000 +#define BSF_INDIRECT (1 << 13) /* BSF_FILE marks symbols that contain a file name. This is used for ELF STT_FILE symbols. */ -#define BSF_FILE 0x4000 +#define BSF_FILE (1 << 14) /* Symbol is from dynamic linking information. */ -#define BSF_DYNAMIC 0x8000 +#define BSF_DYNAMIC (1 << 15) /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ -#define BSF_OBJECT 0x10000 +#define BSF_OBJECT (1 << 16) /* This symbol is a debugging symbol. The value is the offset into the section of the data. BSF_DEBUGGING should be set as well. */ -#define BSF_DEBUGGING_RELOC 0x20000 +#define BSF_DEBUGGING_RELOC (1 << 17) /* This symbol is thread local. Used in ELF. */ -#define BSF_THREAD_LOCAL 0x40000 +#define BSF_THREAD_LOCAL (1 << 18) /* This symbol represents a complex relocation expression, with the expression tree serialized in the symbol name. */ -#define BSF_RELC 0x80000 +#define BSF_RELC (1 << 19) /* This symbol represents a signed complex relocation expression, with the expression tree serialized in the symbol name. */ -#define BSF_SRELC 0x100000 +#define BSF_SRELC (1 << 20) /* This symbol was created by bfd_get_synthetic_symtab. */ -#define BSF_SYNTHETIC 0x200000 +#define BSF_SYNTHETIC (1 << 21) flagword flags; @@ -4711,7 +4769,8 @@ struct bfd /* Used for input and output. */ unsigned int symcount; - /* Symbol table for output BFD (with symcount entries). */ + /* Symbol table for output BFD (with symcount entries). + Also used by the linker to cache input BFD symbols. */ struct bfd_symbol **outsymbols; /* Used for slurped dynamic symbol tables. */