diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-01-08 20:55:10 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-02-25 23:15:02 +0000 |
commit | fdd410ac7a07dfb47dcb992201000582a280d8b2 (patch) | |
tree | 1a68c9b9d5cf73d3e9f227ee5a46183652dcd498 /gas/config/tc-avr.h | |
parent | ac99436572d903781c124fa3cc72d83360202b76 (diff) | |
download | gdb-fdd410ac7a07dfb47dcb992201000582a280d8b2.zip gdb-fdd410ac7a07dfb47dcb992201000582a280d8b2.tar.gz gdb-fdd410ac7a07dfb47dcb992201000582a280d8b2.tar.bz2 |
avr/gas: Write out data to track .org/.align usage.
Adds support to the assembler to write out data for tracking the use of
.org and .align directives. This data is collected within the assembler
and written out to a section ".avr.prop" (if there's anything to write
out).
This patch does not add any tests. The next patch in this series will
add a better mechanism for visualising the contents of .avr.prop which
will make writing tests much easier.
This patch also does not make any use of this collected data, that will
also come along in a later patch; the intended consumer is the linker,
during linker relaxation this information will be used to ensure that
the .org and .align directives are honoured.
bfd/ChangeLog:
* elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
(AVR_PROPERTY_RECORDS_VERSION): Define.
(AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
(struct avr_property_record): New structure.
gas/ChangeLog:
* config/tc-avr.c: Add elf32-avr.h include.
(struct avr_property_record_link): New structure.
(avr_output_property_section_header): New function.
(avr_record_size): New function.
(avr_output_property_record): New function.
(avr_create_property_section): New function.
(avr_handle_align): New function.
(exclude_section_from_property_tables): New function.
(create_record_for_frag): New function.
(append_records_for_section): New function.
(avr_create_and_fill_property_section): New function.
(avr_post_relax_hook): New function.
* config/tc-avr.h (md_post_relax_hook): Define.
(avr_post_relax_hook): Declare.
(HANDLE_ALIGN): Define.
(avr_handle_align): Declare.
(strut avr_frag_data): New structure.
(TC_FRAG_TYPE): Define.
Diffstat (limited to 'gas/config/tc-avr.h')
-rw-r--r-- | gas/config/tc-avr.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gas/config/tc-avr.h b/gas/config/tc-avr.h index c096ce3..21471c8 100644 --- a/gas/config/tc-avr.h +++ b/gas/config/tc-avr.h @@ -216,3 +216,20 @@ extern bfd_boolean avr_allow_local_subtract (expressionS *, expressionS *, segT) #define elf_tc_final_processing avr_elf_final_processing extern void avr_elf_final_processing (void); + +#define md_post_relax_hook avr_post_relax_hook () +extern void avr_post_relax_hook (void); + +#define HANDLE_ALIGN(fragP) avr_handle_align (fragP) +extern void avr_handle_align (fragS *fragP); + +struct avr_frag_data +{ + unsigned is_org : 1; + unsigned is_align : 1; + unsigned has_fill : 1; + + char fill; + offsetT alignment; +}; +#define TC_FRAG_TYPE struct avr_frag_data |