diff options
author | Alan Modra <amodra@gmail.com> | 2018-09-04 10:13:26 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-09-06 14:13:00 +0930 |
commit | deee88e9810fe5a3e73b071713ff6fa03b5c016d (patch) | |
tree | f6df138f6600917454c508e10fdaef7eac3964c6 /bfd | |
parent | Make -Wformat-nonliteral work with gcc (diff) | |
download | binutils-gdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.tar.gz binutils-gdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.tar.bz2 binutils-gdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.zip |
PR23570, AVR .noinit section defaults to PROGBITS
Revert commit 8744470deab and instead use the standard special_sections
support.
PR 23570
bfd/
* elf32-avr.c (elf_avr_special_sections): New.
(elf_backend_special_sections): Define.
gas/
* config/tc-avr.c: Revert 2018-09-03 change.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-avr.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bc1cb15a8f9..a4991050cd8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2018-09-06 Alan Modra <amodra@gmail.com> + + PR 23570 + * elf32-avr.c (elf_avr_special_sections): New. + (elf_backend_special_sections): Define. + 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com> * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 6d38d1db3af..13e28d8a1ed 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -708,6 +708,12 @@ static const struct avr_reloc_map avr_reloc_map[] = { BFD_RELOC_32_PCREL, R_AVR_32_PCREL} }; +static const struct bfd_elf_special_section elf_avr_special_sections[] = +{ + { STRING_COMMA_LEN (".noinit"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, + { NULL, 0, 0, 0, 0 } +}; + /* Meant to be filled one day with the wrap around address for the specific device. I.e. should get the value 0x4000 for 16k devices, 0x8000 for 32k devices and so on. @@ -4256,5 +4262,6 @@ avr_elf32_property_record_name (struct avr_property_record *rec) #define bfd_elf32_bfd_get_relocated_section_contents \ elf32_avr_get_relocated_section_contents #define bfd_elf32_new_section_hook elf_avr_new_section_hook +#define elf_backend_special_sections elf_avr_special_sections #include "elf32-target.h" |