diff options
author | Alan Modra <amodra@gmail.com> | 2015-03-11 17:53:50 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-03-11 18:15:31 +1030 |
commit | f728387b9adccc88edcde44f357f869e33943c6d (patch) | |
tree | 532b22eb96d5fcaa998ffdc6300988049d030c39 /gas | |
parent | 1079403cc002be65ea1c318160efc18c19965389 (diff) | |
download | gdb-f728387b9adccc88edcde44f357f869e33943c6d.zip gdb-f728387b9adccc88edcde44f357f869e33943c6d.tar.gz gdb-f728387b9adccc88edcde44f357f869e33943c6d.tar.bz2 |
Fix powerpc gas abort on invalid instruction fixups
* config/tc-ppc.c (md_assemble): Don't abort on 8 byte insn fixups.
(md_apply_fix): Report an error on data-only fixups used with insns.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 26 |
2 files changed, 28 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 577a1cd..d98b8cb 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-03-11 Alan Modra <amodra@gmail.com> + + * config/tc-ppc.c (md_assemble): Don't abort on 8 byte insn fixups. + (md_apply_fix): Report an error on data-only fixups used with insns. + 2015-03-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/tc-s390.c (md_gather_operands): Check for valid diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 6e96989..3f6de73 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -3431,9 +3431,6 @@ md_assemble (char *str) size = bfd_get_reloc_size (reloc_howto); offset = target_big_endian ? (insn_length - size) : 0; - if (size < 1 || size > 4) - abort (); - fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, @@ -6774,6 +6771,29 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) break; #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_PPC_DTPMOD: + case BFD_RELOC_PPC_TPREL: + case BFD_RELOC_PPC_DTPREL: + case BFD_RELOC_PPC_COPY: + case BFD_RELOC_PPC_GLOB_DAT: + case BFD_RELOC_32_PLT_PCREL: + case BFD_RELOC_PPC_EMB_NADDR32: + case BFD_RELOC_PPC64_TOC: + case BFD_RELOC_CTOR: + case BFD_RELOC_32: + case BFD_RELOC_32_PCREL: + case BFD_RELOC_RVA: + case BFD_RELOC_64: + case BFD_RELOC_64_PCREL: + case BFD_RELOC_PPC64_ADDR64_LOCAL: + as_bad_where (fixP->fx_file, fixP->fx_line, + _("%s unsupported as instruction fixup"), + bfd_get_reloc_code_name (fixP->fx_r_type)); + fixP->fx_done = 1; + return; + default: break; } |