+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
{ 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.
#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"
+2018-09-06 Alan Modra <amodra@gmail.com>
+
+ PR 23570
+ * config/tc-avr.c: Revert 2018-09-03 change.
+
2018-09-04 Daniel Cederman <cederman@gaisler.com>
* config/tc-sparc.c (md_assemble): Allow non-fpop2 instructions
const char FLT_CHARS[] = "dD";
static void avr_set_arch (int);
-static void avr_set_section (int);
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
{
{"arch", avr_set_arch, 0},
- {"section", avr_set_section, 0},
{ NULL, NULL, 0}
};
bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
}
-static void
-avr_set_section (int push)
-{
- obj_elf_section (push);
-
- /* PR 23570. The .noinit section needs to be explicitly
- set to the NOBITS type. */
- if (seg_info (now_seg)->bss == 0
- && strcmp (bfd_get_section_name (stdoutput, now_seg), ".noinit") == 0)
- {
- bfd_set_section_flags (stdoutput, now_seg, SEC_ALLOC | SEC_RELOC);
- seg_info (now_seg)->bss = 1;
- elf_section_type (now_seg) = SHT_NOBITS;
- elf_section_flags (now_seg) = SHF_ALLOC | SHF_WRITE;
- }
-}
-
int
md_parse_option (int c, const char *arg)
{