diff options
author | Alan Modra <amodra@gmail.com> | 2014-06-16 10:56:56 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-06-16 12:31:53 +0930 |
commit | 7e9def1e93c408b5df80ed67b79ef7ac9d5c9289 (patch) | |
tree | 4882000f47bb7d44a07947cb317a7e195c73ba68 | |
parent | 6e210b4129b522c1a0b0c6dee24ee469d5020583 (diff) | |
download | gdb-7e9def1e93c408b5df80ed67b79ef7ac9d5c9289.zip gdb-7e9def1e93c408b5df80ed67b79ef7ac9d5c9289.tar.gz gdb-7e9def1e93c408b5df80ed67b79ef7ac9d5c9289.tar.bz2 |
Fix unintitialised TIC6X data
MALLOC_PERTURB_=1 results in the following fails due to uninitialised
exindx data:
FAIL: C6X unwinding directives 1 (little endian)
FAIL: C6X unwinding directives 2 (big endian)
FAIL: C6X unwinding directives 3 (segment change)
FAIL: ld-tic6x/unwind-1
FAIL: ld-tic6x/unwind-2
FAIL: ld-tic6x/unwind-3
FAIL: ld-tic6x/unwind-4
FAIL: ld-tic6x/unwind-6
* config/tc-tic6x.c (s_tic6x_ehtype): Clear after frag_more.
(tic6x_output_exidx_entry): Likewise.
(md_apply_fix): Simplify 1 byte md_number_to_chars.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-tic6x.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 7e39715..55a0d00 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2014-06-16 Alan Modra <amodra@gmail.com> + * config/tc-tic6x.c (s_tic6x_ehtype): Clear after frag_more. + (tic6x_output_exidx_entry): Likewise. + (md_apply_fix): Simplify 1 byte md_number_to_chars. + +2014-06-16 Alan Modra <amodra@gmail.com> + * config/tc-tic54x.c (tic54x_mlib): Don't write garbage past end of archive to temp file. (tic54x_start_line_hook): Start scan for parallel on next line, diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c index aca07d3..3f2912a 100644 --- a/gas/config/tc-tic6x.c +++ b/gas/config/tc-tic6x.c @@ -536,6 +536,7 @@ s_tic6x_ehtype (int ignored ATTRIBUTE_UNUSED) } p = frag_more (4); + memset (p, 0, 4); fix_new_exp (frag_now, p - frag_now->fr_literal, 4, &exp, 0, BFD_RELOC_C6000_EHTYPE); @@ -3823,7 +3824,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) if (value < -0x80 || value > 0xff) as_bad_where (fixP->fx_file, fixP->fx_line, _("value too large for 1-byte field")); - md_number_to_chars (buf, value, 1); + *buf = value; } break; @@ -4835,6 +4836,7 @@ tic6x_output_exidx_entry (void) record_alignment (now_seg, 2); ptr = frag_more (8); + memset (ptr, 0, 8); where = frag_now_fix () - 8; /* Self relative offset of the function start. */ |