diff options
author | Alan Modra <amodra@gmail.com> | 2021-01-25 15:17:15 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-01-26 20:54:43 +1030 |
commit | 4287950e540900bfefa113f264c7f798b1616ee0 (patch) | |
tree | 8369858e3ff877ea35b82f02d09187d0b69eac07 /bfd | |
parent | d0cc52bdf2e6a586cac70000518c95619970619b (diff) | |
download | gdb-4287950e540900bfefa113f264c7f798b1616ee0.zip gdb-4287950e540900bfefa113f264c7f798b1616ee0.tar.gz gdb-4287950e540900bfefa113f264c7f798b1616ee0.tar.bz2 |
pr27228 testcase
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf32-ft32.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 949a644..96b9cdf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c index bd0ed3e..5a6ec76 100644 --- a/bfd/elf32-ft32.c +++ b/bfd/elf32-ft32.c @@ -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]; |