+2019-05-15 Alan Modra <amodra@gmail.com>
+
+ * dwarf2dbg.c: Whitespace fixes.
+ (get_filenum): Don't strdup "file". Adjust error message.
+ (dwarf2_directive_filename): Use an unsigned type for "num".
+ Catch truncation of file number and overflow of get_filenum
+ XRESIZEVEC multiplication. Delete dead code.
+
2019-05-15 Alan Modra <amodra@gmail.com>
PR 24538
2019-04-29 John Darrington <john@darrington.wattle.id.au>
- * testsuite/gas/s12z/truncated.d: New file.
+ * testsuite/gas/s12z/truncated.d: New file.
* testsuite/gas/s12z/truncated.s: New file.
* testsuite/gas/s12z/s12z.exp: Add new test.
* testsuite/gas/arm/archv8m_1m-cmse-main.s: Likewise.
2019-04-15 Sudakshina Das <sudi.das@arm.com>
- Andre Vieira <andre.simoesdiasvieira@arm.com>
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/tc-arm.c (operand_parse_code): Add OP_LR and OP_oLR
for the LR operand and optional LR operand.
* testsuite/gas/arm/armv8_1-m-tloop-bad.l: New.
2019-04-15 Sudakshina Das <sudi.das@arm.com>
- Andre Vieira <andre.simoesdiasvieira@arm.com>
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/tc-arm.c (T16_32_TAB): New entriy for bfcsel.
(do_t_v8_1_branch): New switch case for bfcsel.
(tc_gen_reloc): Likewise.
2019-04-15 Sudakshina Das <sudi.das@arm.com>
- Andre Vieira <andre.simoesdiasvieira@arm.com>
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/tc-arm.c (T16_32_TAB): New entrie for bfl.
(do_t_v8_1_branch): New switch case for bfl.
* testsuite/gas/arm/armv8_1-m-bf-exchange-bad.d: New
2019-04-15 Sudakshina Das <sudi.das@arm.com>
- Andre Vieira <andre.simoesdiasvieira@arm.com>
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/tc-arm.c (T16_32_TAB): New entries for bf.
(do_t_branch_future): New.
* testsuite/gas/mips/mips.exp: Run the new test.
2019-04-12 John Darrington <john@darrington.wattle.id.au>
-
+
config/tc-s12z.h: Remove definition of macro TC_M68K
2019-04-01 John Darrington <john@darrington.wattle.id.au>
-
+
config/tc-s12z.c: Use bfd_boolean where appropriate.
2019-04-11 Max Filippov <jcmvbkbc@gmail.com>
2019-01-31 John Darrington <john@darrington.wattle.id.au>
- * config/tc-s12z.c (lex_imm): Add new argument exp_o.
+ * config/tc-s12z.c (lex_imm): Add new argument exp_o.
(emit_reloc): New function.
(md_apply_fix): [BFD_RELOC_S12Z_OPR] Recognise that it
can be either 2 bytes or 3 bytes long.
2019-01-09 John Darrington <john@darrington.wattle.id.au>
- * testsuite/gas/s12z/jsr.s: New case.
+ * testsuite/gas/s12z/jsr.s: New case.
* testsuite/gas/s12z/jsr.d: New case.
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
/* Catch wraparound. */
if (files_allocated <= old)
{
- as_bad (_("file number %u is too big"), i);
+ as_bad (_("file number %lu is too big"), (unsigned long) i);
return 0;
}
memset (files + old, 0, (i + 32 - old) * sizeof (struct file_entry));
}
- files[i].filename = num ? file : xstrdup (file);
+ files[i].filename = file;
files[i].dir = dir;
if (files_in_use < i + 1)
files_in_use = i + 1;
char *
dwarf2_directive_filename (void)
{
- offsetT num;
+ valueT num;
char *filename;
int filename_len;
return NULL;
demand_empty_rest_of_line ();
- if (num < 1)
+ if ((offsetT) num < 1)
{
as_bad (_("file number less than one"));
return NULL;
being supplied. Turn off gas generated debug info. */
debug_type = DEBUG_NONE;
- if (num < (offsetT) files_in_use && files[num].filename != 0)
+ if (num != (unsigned int) num
+ || num >= (size_t) -1 / sizeof (struct file_entry) - 32)
{
- as_bad (_("file number %ld already allocated"), (long) num);
+ as_bad (_("file number %lu is too big"), (unsigned long) num);
return NULL;
}
- else if (num < 0)
+ if (num < files_in_use && files[num].filename != 0)
{
- as_bad (_("file number %ld is too small!"), (long) num);
+ as_bad (_("file number %u already allocated"), (unsigned int) num);
return NULL;
}
if (DWARF2_LINE_MIN_INSN_LENGTH > 1)
{
if (*addr_delta % DWARF2_LINE_MIN_INSN_LENGTH != 0 && !printed_this)
- {
+ {
as_bad("unaligned opcodes detected in executable segment");
- printed_this = 1;
- }
+ printed_this = 1;
+ }
*addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH;
}
}
out_uleb128 (files[i].dir); /* directory number */
/* Output the last modification timestamp. */
out_uleb128 (DWARF2_FILE_TIME_NAME (files[i].filename,
- files[i].dir ? dirs [files [i].dir] : ""));
+ files[i].dir ? dirs [files [i].dir] : ""));
/* Output the filesize. */
out_uleb128 (DWARF2_FILE_SIZE_NAME (files[i].filename,
- files[i].dir ? dirs [files [i].dir] : ""));
+ files[i].dir ? dirs [files [i].dir] : ""));
}
/* Terminate filename list. */