]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
pr27228 testcase
authorAlan Modra <amodra@gmail.com>
Mon, 25 Jan 2021 04:47:15 +0000 (15:17 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Jan 2021 10:24:43 +0000 (20:54 +1030)
This failed on ft32, hppa, and mips-irix targets.  In the case of ft32
the problem was iterating over an array in reverse and not using the
proper condition, so BFD_RELOC_NONE was not recognised.

bfd/
* elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
gas/
PR 27282
* testsuite/gas/all/none.d: Replace skip with xfail, don't xfail ft32.
* testsuite/gas/elf/pr27228.d: xfail hppa and allow OBJECT match.

bfd/ChangeLog
bfd/elf32-ft32.c
gas/ChangeLog
gas/testsuite/gas/all/none.d
gas/testsuite/gas/elf/pr27228.d

index 949a644ac43bc03593df5b242cf6c8d30dc8c9b8..96b9cdf2452361d42b9a913835e0acd435161fde 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-26  Alan Modra  <amodra@gmail.com>
+
+       * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
+
 2021-01-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/27231
index bd0ed3e81d31ed9b77e2875739204dec9ce185d6..5a6ec764804afdf06f6425db2f39710c1a99fd8d 100644 (file)
@@ -267,8 +267,7 @@ ft32_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 {
   unsigned int i;
 
-  for (i = sizeof (ft32_reloc_map) / sizeof (ft32_reloc_map[0]);
-       --i;)
+  for (i = 0; i < sizeof (ft32_reloc_map) / sizeof (ft32_reloc_map[0]); i++)
     if (ft32_reloc_map [i].bfd_reloc_val == code)
       return & ft32_elf_howto_table [ft32_reloc_map[i].ft32_reloc_val];
 
index 8cdcbc5088fb4c1322883cc439cc7857a48282ff..6d4af3e9889c78b79c302d363e1ea78df264e763 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-26  Alan Modra  <amodra@gmail.com>
+
+       PR 27282
+       * testsuite/gas/all/none.d: Replace skip with xfail, don't xfail ft32.
+       * testsuite/gas/elf/pr27228.d: xfail hppa and allow OBJECT match.
+
 2021-01-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/27228
index deebab8b49cc9cbbc3c14d2b873edb07b9936ad3..374808a4f59a0c379494fc9b38433517338e2869 100644 (file)
@@ -1,7 +1,7 @@
 #objdump: -r -w
 #as: --generate-missing-build-notes=no
 # The HPPA maps R_PARISC_PCREL64 onto BFD_RELOC_NONE.
-#skip: ft32-*-* hppa*-*-*
+#xfail: hppa*-*-*
 
 #...
 0+ .*(NONE|NULL|UNUSED0) +\*ABS\*
index a44a61ec0fd43ee43490f7e2fa04ff44d24a9e1a..da336ff219131cc9851d6e3c51980ccde17783e8 100644 (file)
@@ -1,8 +1,10 @@
 #as:
 #name: .reloc against undefined local symbol (PR 27228)
 #readelf: -sW
+# hppa doesn't support use of any BFD_RELOC_*
+#xfail: hppa*-*-*
 
 Symbol table '\.symtab' contains [0-9]+ entries:
 #...
- +[a-f0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND .LTHUNK5.lto_priv.0
+ +[a-f0-9]+: 0+ +0 (NOTYPE|OBJECT) +GLOBAL DEFAULT +UND .LTHUNK5.lto_priv.0
 #pass