X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fmach-o-aarch64.c;h=c71b92e47cad0bbcabc06fe8c7a92c2940bc6dea;hb=23c8270e9dc60bb78c1800b7deedc117efdb9e92;hp=0d3c8eeb8c234133820907fafe85c1ffefa2905d;hpb=f075eb5e6b0dd850304f78cf4d5c94df7b44c7a3;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/mach-o-aarch64.c b/bfd/mach-o-aarch64.c index 0d3c8eeb8c..c71b92e47c 100644 --- a/bfd/mach-o-aarch64.c +++ b/bfd/mach-o-aarch64.c @@ -1,5 +1,5 @@ /* AArch-64 Mach-O support for BFD. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,10 +19,10 @@ MA 02110-1301, USA. */ #include "sysdep.h" -#include "mach-o.h" #include "bfd.h" #include "libbfd.h" #include "libiberty.h" +#include "mach-o.h" #include "mach-o/arm64.h" #define bfd_mach_o_object_p bfd_mach_o_arm64_object_p @@ -40,17 +40,17 @@ #define bfd_mach_o_tgt_seg_table NULL #define bfd_mach_o_section_type_valid_for_tgt NULL -static const bfd_target * +static bfd_cleanup bfd_mach_o_arm64_object_p (bfd *abfd) { return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_ARM64); } -static const bfd_target * +static bfd_cleanup bfd_mach_o_arm64_core_p (bfd *abfd) { return bfd_mach_o_header_p (abfd, 0, - BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM64); + BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM64); } static bfd_boolean @@ -147,9 +147,11 @@ static reloc_howto_type arm64_howto_table[]= }; static bfd_boolean -bfd_mach_o_arm64_canonicalize_one_reloc (bfd *abfd, - struct mach_o_reloc_info_external *raw, - arelent *res, asymbol **syms) +bfd_mach_o_arm64_canonicalize_one_reloc (bfd * abfd, + struct mach_o_reloc_info_external * raw, + arelent * res, + asymbol ** syms, + arelent * res_base ATTRIBUTE_UNUSED) { bfd_mach_o_reloc_info reloc; @@ -211,18 +213,18 @@ bfd_mach_o_arm64_canonicalize_one_reloc (bfd *abfd, break; case BFD_MACH_O_ARM64_RELOC_SUBTRACTOR: if (reloc.r_pcrel) - return FALSE; + return FALSE; switch (reloc.r_length) - { - case 2: - res->howto = &arm64_howto_table[11]; - return TRUE; - case 3: - res->howto = &arm64_howto_table[12]; - return TRUE; - default: - return FALSE; - } + { + case 2: + res->howto = &arm64_howto_table[11]; + return TRUE; + case 3: + res->howto = &arm64_howto_table[12]; + return TRUE; + default: + return FALSE; + } break; case BFD_MACH_O_ARM64_RELOC_BRANCH26: if (reloc.r_length == 2 && reloc.r_pcrel == 1) @@ -293,12 +295,12 @@ bfd_mach_o_arm64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -#define TARGET_NAME aarch64_mach_o_vec -#define TARGET_STRING "mach-o-arm64" +#define TARGET_NAME aarch64_mach_o_vec +#define TARGET_STRING "mach-o-arm64" #define TARGET_ARCHITECTURE bfd_arch_aarch64 #define TARGET_PAGESIZE 4096 -#define TARGET_BIG_ENDIAN 0 -#define TARGET_ARCHIVE 0 +#define TARGET_BIG_ENDIAN 0 +#define TARGET_ARCHIVE 0 #define TARGET_PRIORITY 0 #include "mach-o-target.c"