diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-01-08 21:55:43 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-02-25 23:17:27 +0000 |
commit | 137c83d69fad77677cc818593f9399caa777a0c5 (patch) | |
tree | 3a3c32502d2caca7ede6a974a35bf3e960224abd /gas | |
parent | fdd410ac7a07dfb47dcb992201000582a280d8b2 (diff) | |
download | fsf-binutils-gdb-137c83d69fad77677cc818593f9399caa777a0c5.zip fsf-binutils-gdb-137c83d69fad77677cc818593f9399caa777a0c5.tar.gz fsf-binutils-gdb-137c83d69fad77677cc818593f9399caa777a0c5.tar.bz2 |
avr/objdump: Support dumping .avr.prop section.
Add support to objdump for dumping the .avr.prop section in a structured
way.
binutils/ChangeLog:
* od-elf32_avr.c: Add elf32-avr.h include.
(OPT_AVRPROP): Define.
(options[]): Add 'avr-prop' entry.
(elf32_avr_help): Add avr-prop help text.
(elf32_avr_dump_avr_prop): New function.
(elf32_avr_dump): Add check for avr-prop.
bfd/ChangeLog:
* elf32-avr.h (struct avr_property_header): New strucure.
(avr_elf32_load_property_records): Declare.
(avr_elf32_property_record_name): Declare.
* elf32-avr.c: Add bfd_stdint.h include.
(retrieve_local_syms): New function.
(get_elf_r_symndx_section): New function.
(get_elf_r_symndx_offset): New function.
(internal_reloc_compare): New function.
(struct avr_find_section_data): New structure.
(avr_is_section_for_address): New function.
(avr_find_section_for_address): New function.
(avr_elf32_load_records_from_section): New function.
(avr_elf32_load_property_records): New function.
(avr_elf32_property_record_name): New function.
gas/testsuite/ChangeLog:
* gas/avr/avr-prop-1.d: New file.
* gas/avr/avr-prop-1.s: New file.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/avr/avr-prop-1.d | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/avr/avr-prop-1.s | 29 |
3 files changed, 60 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 1cf803e..96697eb 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com> + + * gas/avr/avr-prop-1.d: New file. + * gas/avr/avr-prop-1.s: New file. + 2015-02-25 Kaz Kojima <kkojima@rr.iij4u.or.jp> Oleg Endo <olegendo@gcc.gnu.org> diff --git a/gas/testsuite/gas/avr/avr-prop-1.d b/gas/testsuite/gas/avr/avr-prop-1.d new file mode 100644 index 0000000..b140ae6 --- /dev/null +++ b/gas/testsuite/gas/avr/avr-prop-1.d @@ -0,0 +1,26 @@ +#name: AVR '.avr.prop' test 1 +#as: -mmcu=avrxmega2 -mlink-relax +#objdump: -P avr-prop +#source: avr-prop-1.s +#target: avr-*-* + +.*: file format elf32-avr + +Contents of `\.avr\.prop' section: + + Version: 1 + Flags: 0 + + 0 ORG @ \.text\.1 \+ 0x000020 \(0x000020\) + 1 ORG @ \.text\.1 \+ 0x000044 \(0x000044\) + 2 ORG @ \.text\.2 \+ 0x000020 \(0x000020\) + 3 ALIGN @ \.text\.2 \+ 0x000020 \(0x000020\) + Align: 0x000004 + 4 ALIGN @ \.text\.2 \+ 0x000030 \(0x000030\) + Align: 0x000004 + 5 ORG @ \.text\.2 \+ 0x000200 \(0x000200\) + 6 ALIGN @ \.text\.2 \+ 0x000200 \(0x000200\) + Align: 0x000004 + 7 ALIGN @ \.text\.3 \+ 0x000100 \(0x000100\) + Align: 0x000008 + diff --git a/gas/testsuite/gas/avr/avr-prop-1.s b/gas/testsuite/gas/avr/avr-prop-1.s new file mode 100644 index 0000000..6e50cf1 --- /dev/null +++ b/gas/testsuite/gas/avr/avr-prop-1.s @@ -0,0 +1,29 @@ + .section ".text.1", "ax" + .global _start +_start: + .org 0x20 + nop + .org 0x44 + nop + + + .section ".text.2", "ax" + .global test2 +text2: + .org 0x20 + nop + .align 4 + nop + .align 4 + nop + .org 0x200 + nop + + .section ".text.3", "ax" + .global test3 +text3: + .org 0x0 + nop + nop + .align 8 + nop |