This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 0/3] AVR linker relaxation org/align support
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: binutils at sourceware dot org
- Cc: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Fri, 9 Jan 2015 23:58:20 +0000
- Subject: [PATCH 0/3] AVR linker relaxation org/align support
- Authentication-results: sourceware.org; auth=none
This patch series adds support to the AVR toolchain so that .org and
.align directives, used in the assembler, will be honoured in the
linker, even when linker relaxation is used.
Previously, and .org or .align directives were only considered within
the assembler, once the section contents had been generated and passed
to the linker all the .org / .align information was discarded, and the
linker would be happy to break the .org / .align requirements during
linker relaxation.
This series is in three parts, in the first patch I extend the
assembler to capture and record the .org and .align information. This
is written out into a new .avr.prop section.
In the second patch I add support to objdump to pretty print the
contents of the .avr.prop section. This includes adding the code for
loading the contents of the section back in.
The third patch extends the linker (well bfd really) so that during
linker relaxation, the contents of the .avr.prop section are used to
control which bytes can be deleted so that the .org and .align
directives are still maintained.
I'd welcome feedback and review. Otherwise, OK to merge?
Thanks,
Andrew
---
Andrew Burgess (3):
avr/gas: Write out data to track .org/.align usage.
avr/objdump: Support dumping .avr.prop section.
AVR/ld: Use .avr.prop data during linker relaxation.
bfd/elf32-avr.c | 761 ++++++++++++++++++++++++++++++++++++-
bfd/elf32-avr.h | 84 ++++
binutils/od-elf32_avr.c | 54 +++
gas/config/tc-avr.c | 337 ++++++++++++++++
gas/config/tc-avr.h | 17 +
gas/testsuite/gas/avr/avr-prop-1.d | 26 ++
gas/testsuite/gas/avr/avr-prop-1.s | 29 ++
ld/testsuite/ld-avr/avr-prop-1.d | 10 +
ld/testsuite/ld-avr/avr-prop-1.s | 7 +
ld/testsuite/ld-avr/avr-prop-2.d | 12 +
ld/testsuite/ld-avr/avr-prop-2.s | 13 +
ld/testsuite/ld-avr/avr-prop-3.d | 10 +
ld/testsuite/ld-avr/avr-prop-3.s | 8 +
ld/testsuite/ld-avr/avr-prop-4.d | 10 +
ld/testsuite/ld-avr/avr-prop-4.s | 8 +
15 files changed, 1385 insertions(+), 1 deletion(-)
create mode 100644 gas/testsuite/gas/avr/avr-prop-1.d
create mode 100644 gas/testsuite/gas/avr/avr-prop-1.s
create mode 100644 ld/testsuite/ld-avr/avr-prop-1.d
create mode 100644 ld/testsuite/ld-avr/avr-prop-1.s
create mode 100644 ld/testsuite/ld-avr/avr-prop-2.d
create mode 100644 ld/testsuite/ld-avr/avr-prop-2.s
create mode 100644 ld/testsuite/ld-avr/avr-prop-3.d
create mode 100644 ld/testsuite/ld-avr/avr-prop-3.s
create mode 100644 ld/testsuite/ld-avr/avr-prop-4.d
create mode 100644 ld/testsuite/ld-avr/avr-prop-4.s
--
1.9.3