+2013-09-18 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-msp430.c (OPTION_MOVE_DATA): Define.
+ (move_data): New variable.
+ (md_parse_option): Parse -md.
+ (msp430_section): New function. Catch references to the .bss or
+ .data sections and generate a special symbol for use by the libcrt
+ library.
+ (md_pseudo_table): Intercept .section directives.
+ (md_longopt): Add -md
+ (md_show_usage): Likewise.
+ (msp430_operands): Generate a warning message if a NOP is inserted
+ into the instruction stream.
+ * doc/c-msp430.texi (node MSP430 Options): Document -md option.
+
2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
* config/tc-mips.c (mips_elf_final_processing): Set
- EF_MIPS_FP64 for -mgp32 -mfp64, removing old FIXME.
+ EF_MIPS_FP64 for -mgp32 -mfp64, removing old FIXME.
2013-09-16 Will Newton <will.newton@linaro.org>
#define OPTION_NO_INTR_NOPS 'N'
static bfd_boolean gen_interrupt_nops = TRUE;
#define OPTION_MCPU 'c'
+#define OPTION_MOVE_DATA 'd'
+static bfd_boolean move_data = FALSE;
static void
msp430_set_arch (int option)
case OPTION_NO_INTR_NOPS:
gen_interrupt_nops = FALSE;
return 1;
+
+ case OPTION_MOVE_DATA:
+ move_data = TRUE;
+ return 1;
}
return 0;
}
+static void
+msp430_section (int arg)
+{
+ char * saved_ilp = input_line_pointer;
+ char * name = obj_elf_section_name ();
+
+ if (strncmp (name, ".bss", 4) == 0
+ || strncmp (name, ".gnu.linkonce.b.", 16) == 0)
+ (void) symbol_find_or_make ("__crt0_init_bss");
+
+ if (move_data
+ && (strncmp (name, ".data", 5) == 0
+ || strncmp (name, ".gnu.linkonce.d.", 16) == 0))
+ (void) symbol_find_or_make ("__crt0_movedata");
+
+ input_line_pointer = saved_ilp;
+ obj_elf_section (arg);
+}
+
const pseudo_typeS md_pseudo_table[] =
{
{"arch", msp430_set_arch, OPTION_MMCU},
{"cpu", msp430_set_arch, OPTION_MCPU},
{"profiler", msp430_profiler, 0},
+ {"section", msp430_section, 0},
+ {"section.s", msp430_section, 0},
+ {"sect", msp430_section, 0},
+ {"sect.s", msp430_section, 0},
+ {"pushsection", msp430_section, 1},
{NULL, NULL, 0}
};
{"mQ", no_argument, NULL, OPTION_RELAX},
{"ml", no_argument, NULL, OPTION_LARGE},
{"mN", no_argument, NULL, OPTION_NO_INTR_NOPS},
+ {"md", no_argument, NULL, OPTION_MOVE_DATA},
{NULL, no_argument, NULL, 0}
};
_(" -ml - enable large code model\n"));
fprintf (stream,
_(" -mN - disable generation of NOP after changing interrupts\n"));
+ fprintf (stream,
+ _(" -md - Force copying of data from ROM to RAM at startup\n"));
show_mcu_list (stream);
}
See 1.3.4.1 of the MSP430x5xx User Guide. */
insn_length += 2;
frag = frag_more (2);
+ as_warn (_("a NOP instruction has been inserted after %s"),
+ opcode->name);
bfd_putl16 ((bfd_vma) 0x4303 /* NOP */, frag);
}
dwarf2_emit_insn (insn_length);
insn_length += 2;
frag = frag_more (2);
bfd_putl16 ((bfd_vma) 0x4303 /* NOP */, frag);
+ as_warn (_("a NOP instruction has been inserted after %s"),
+ opcode->name);
}
dwarf2_emit_insn (insn_length);
insn_length += 2;
frag = frag_more (2);
bfd_putl16 ((bfd_vma) 0x4303 /* NOP */, frag);
+ as_warn (_("a NOP instruction has been inserted after %s"),
+ opcode->name);
}
dwarf2_emit_insn (insn_length);