mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 04:13:50 +08:00
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.
This commit is contained in:
@ -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>
|
2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||||
|
|
||||||
* elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
|
* elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
|
||||||
|
@ -708,6 +708,12 @@ static const struct avr_reloc_map avr_reloc_map[] =
|
|||||||
{ BFD_RELOC_32_PCREL, R_AVR_32_PCREL}
|
{ 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
|
/* 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,
|
specific device. I.e. should get the value 0x4000 for 16k devices,
|
||||||
0x8000 for 32k devices and so on.
|
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 \
|
#define bfd_elf32_bfd_get_relocated_section_contents \
|
||||||
elf32_avr_get_relocated_section_contents
|
elf32_avr_get_relocated_section_contents
|
||||||
#define bfd_elf32_new_section_hook elf_avr_new_section_hook
|
#define bfd_elf32_new_section_hook elf_avr_new_section_hook
|
||||||
|
#define elf_backend_special_sections elf_avr_special_sections
|
||||||
|
|
||||||
#include "elf32-target.h"
|
#include "elf32-target.h"
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2018-09-04 Daniel Cederman <cederman@gaisler.com>
|
||||||
|
|
||||||
* config/tc-sparc.c (md_assemble): Allow non-fpop2 instructions
|
* config/tc-sparc.c (md_assemble): Allow non-fpop2 instructions
|
||||||
|
@ -481,13 +481,11 @@ const char EXP_CHARS[] = "eE";
|
|||||||
const char FLT_CHARS[] = "dD";
|
const char FLT_CHARS[] = "dD";
|
||||||
|
|
||||||
static void avr_set_arch (int);
|
static void avr_set_arch (int);
|
||||||
static void avr_set_section (int);
|
|
||||||
|
|
||||||
/* The target specific pseudo-ops which we support. */
|
/* The target specific pseudo-ops which we support. */
|
||||||
const pseudo_typeS md_pseudo_table[] =
|
const pseudo_typeS md_pseudo_table[] =
|
||||||
{
|
{
|
||||||
{"arch", avr_set_arch, 0},
|
{"arch", avr_set_arch, 0},
|
||||||
{"section", avr_set_section, 0},
|
|
||||||
{ NULL, NULL, 0}
|
{ NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -704,23 +702,6 @@ avr_set_arch (int dummy ATTRIBUTE_UNUSED)
|
|||||||
bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
|
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
|
int
|
||||||
md_parse_option (int c, const char *arg)
|
md_parse_option (int c, const char *arg)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user