bfd: aarch64: fix word and arrdess size declaration in ilp32 mode
authorYury Norov <ynorov@caviumnetworks.com>
Fri, 9 Dec 2016 16:17:58 +0000 (21:47 +0530)
committerYury Norov <ynorov@caviumnetworks.com>
Wed, 21 Dec 2016 12:26:03 +0000 (17:56 +0530)
ILP32 has 32-bit word and address, but currently they declared as 64-bit in
bfd_aarch64_arch_ilp32, which breaks further logic of bfd. This patch fixes it.

Glibc testsuite build with patched binutils shows that next tests stop to fail:
iconvdata/mtrace-tst-loading
iconvdata/tst-loading
iconvdata/tst-tables
localedata/mtrace-tst-leaks
localedata/tst-leaks
posix/tst-getaddrinfo4
posix/tst-getaddrinfo5
posix/tst-regex2

bfd/ChangeLog
bfd/cpu-aarch64.c

index 259825de7ad2719f3ff4b4244e1e7f86459d5ac0..fefad352f0bf7d5a16cbc0825313ee73295263bb 100644 (file)
@@ -1,3 +1,10 @@
+2016-12-21: Yury Norov <ynorov@caviumnetworks.com>
+            Andreas Schwab <schwab@suse.de>
+
+       * cpu-aarch64.c: Fix word and address size declaration in
+       ilp32 mode in bfd_arch_info_type bfd_aarch64_arch_ilp32
+       structure.
+
 2016-12-20  Andrew Waterman  <andrew@sifive.com>
 
        * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Use
index 596d24190b589d8380b2ee3ff5855cbf71757f67..1adc67017655e4a0505b36b237afd0f588977f2d 100644 (file)
@@ -100,16 +100,16 @@ scan (const struct bfd_arch_info *info, const char *string)
   return FALSE;
 }
 
-#define N(NUMBER, PRINT, DEFAULT, NEXT)                                \
-  { 64, 64, 8, bfd_arch_aarch64, NUMBER,                       \
+#define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT)              \
+  { WORDSIZE, WORDSIZE, 8, bfd_arch_aarch64, NUMBER,           \
     "aarch64", PRINT, 4, DEFAULT, compatible, scan,            \
     bfd_arch_default_fill, NEXT }
 
 static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
-  N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", FALSE, NULL);
+  N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
 
 const bfd_arch_info_type bfd_aarch64_arch =
-  N (0, "aarch64", TRUE, &bfd_aarch64_arch_ilp32);
+  N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32);
 
 bfd_boolean
 bfd_is_aarch64_special_symbol_name (const char *name, int type)