aboutsummaryrefslogtreecommitdiff
path: root/binutils/od-elf32_avr.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-10-07 20:47:38 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-10-12 09:43:11 +0100
commit431ff0756ac64c33f6cfbfa8f1cc21c739b7e601 (patch)
treee06c926013655526545f575beace125447c7d346 /binutils/od-elf32_avr.c
parentef05be83b7e1e10e7cba51aeafc879ca3a66826d (diff)
downloadgdb-431ff0756ac64c33f6cfbfa8f1cc21c739b7e601.zip
gdb-431ff0756ac64c33f6cfbfa8f1cc21c739b7e601.tar.gz
gdb-431ff0756ac64c33f6cfbfa8f1cc21c739b7e601.tar.bz2
avr: Fix bugs in org/align tracking.
This commit fixes a few issues in the mechanism for passing information about ".org" and ".align" directives from the assembler to the linker, used by the avr target. In the original commit fdd410ac7a07dfb47dcb992201000582a280d8b2, there were some mistakes when writing out information about ".align" directives: - An align with fill does not write out its information correctly, the fill data overwrites the alignment data. - Each alignment directive is recorded at the location where the previous alignment directive should be recorded, the first alignment directive is discarded. In commit 137c83d69fad77677cc818593f9399caa777a0c5, the data produced by objdump is not correct: - It's miss-aligned due to a missing whitespace. - The fill data for align with fill records is not displayed correctly. All of the above issues are addressed in this commit, and the test is improved to cover these cases. binutils/ChangeLog: * od-elf32_avr.c (elf32_avr_dump_avr_prop): Fix printing of align specific data, fix formatting for align and org data. gas/ChangeLog: * config/tc-avr.c (avr_output_property_record): Fix overwrite bug for align and fill records. (avr_handle_align): Record fill information for align frags. (create_record_for_frag): Add next frag assertion, use correct address for align records. gas/testsuite/ChangeLog: * gas/avr/avr-prop-1.s: Use fill in some cases. * gas/avr/avr-prop-1.d: Update expected results.
Diffstat (limited to 'binutils/od-elf32_avr.c')
-rw-r--r--binutils/od-elf32_avr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/od-elf32_avr.c b/binutils/od-elf32_avr.c
index 5635964..1abbc1f 100644
--- a/binutils/od-elf32_avr.c
+++ b/binutils/od-elf32_avr.c
@@ -271,13 +271,13 @@ elf32_avr_dump_avr_prop (bfd *abfd)
r_list->records [i].data.org.fill);
break;
case RECORD_ALIGN:
- printf (" Align: %#08lx\n",
+ printf (" Align: %#08lx\n",
r_list->records [i].data.align.bytes);
break;
case RECORD_ALIGN_AND_FILL:
- printf (" Align: %#08lx, Fill: %#08lx\n",
+ printf (" Align: %#08lx, Fill: %#08lx\n",
r_list->records [i].data.align.bytes,
- r_list->records [i].data.org.fill);
+ r_list->records [i].data.align.fill);
break;
}
}