X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fbfd-in2.h;h=33a29406ae3f4786e1ccb727e29736c2179f122c;hb=8669f96f0d1fee8eddc4cb56ba68125abfe61f56;hp=6d92c51cb976cc85c3fbedf340a72bb4b5f435f2;hpb=4207142d6a5d2359170c5f9a140fc1a2351fbda9;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6d92c51cb9..33a29406ae 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7,7 +7,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright (C) 1990-2018 Free Software Foundation, Inc. + Copyright (C) 1990-2019 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -41,6 +41,7 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" +#include "bfd_stdint.h" #include "diagnostics.h" #include #include @@ -1001,11 +1002,45 @@ extern void bfd_elf64_aarch64_init_maps extern void bfd_elf32_aarch64_init_maps (bfd *); +/* Types of PLTs based on the level of security. This would be a + bit-mask to denote which of the combinations of security features + are enabled: + - No security feature PLTs + - PLTs with BTI instruction + - PLTs with PAC instruction +*/ +typedef enum +{ + PLT_NORMAL = 0x0, /* Normal plts. */ + PLT_BTI = 0x1, /* plts with bti. */ + PLT_PAC = 0x2, /* plts with pointer authentication. */ + PLT_BTI_PAC = PLT_BTI | PLT_PAC +} aarch64_plt_type; + +/* To indicate if BTI is enabled with/without warning. */ +typedef enum +{ + BTI_NONE = 0, /* BTI is not enabled. */ + BTI_WARN = 1, /* BTI is enabled with --force-bti. */ +} aarch64_enable_bti_type; + +/* A structure to encompass all information coming from BTI or PAC + related command line options. This involves the "PLT_TYPE" to determine + which version of PLTs to pick and "BTI_TYPE" to determine if + BTI should be turned on with any warnings. */ +typedef struct +{ + aarch64_plt_type plt_type; + aarch64_enable_bti_type bti_type; +} aarch64_bti_pac_info; + extern void bfd_elf64_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int, + aarch64_bti_pac_info); extern void bfd_elf32_aarch64_set_options - (bfd *, struct bfd_link_info *, int, int, int, int, int, int); + (bfd *, struct bfd_link_info *, int, int, int, int, int, int, + aarch64_bti_pac_info); /* ELF AArch64 mapping symbol support. */ #define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0) @@ -2358,6 +2393,8 @@ enum bfd_architecture #define bfd_mach_rl78 0x75 bfd_arch_rx, /* Renesas RX. */ #define bfd_mach_rx 0x75 +#define bfd_mach_rx_v2 0x76 +#define bfd_mach_rx_v3 0x77 bfd_arch_s390, /* IBM s390. */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 @@ -6693,6 +6730,9 @@ assembler and not (currently) written to any object files. */ BFD_RELOC_CKCORE_IRELATIVE, BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4, BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4, + +/* S12Z relocations. */ + BFD_RELOC_S12Z_OPR, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;