aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-09-04 10:13:26 +0930
committerAlan Modra <amodra@gmail.com>2018-09-06 14:13:00 +0930
commitdeee88e9810fe5a3e73b071713ff6fa03b5c016d (patch)
treef6df138f6600917454c508e10fdaef7eac3964c6 /bfd/elf32-avr.c
parentf1628857d783fee0171f16f1bad0b7816460dec5 (diff)
downloadgdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.zip
gdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.tar.gz
gdb-deee88e9810fe5a3e73b071713ff6fa03b5c016d.tar.bz2
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/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 6d38d1d..13e28d8 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"