mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
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 commitfdd410ac7a, 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 commit137c83d69f, 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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user