msp430.h: Pass -mcode/data-region to the linker and -mdata-region to the assembler.
authorJozef Lawrynowicz <jozef.l@somniumtech.com>
Wed, 30 Aug 2017 09:33:56 +0000 (09:33 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Wed, 30 Aug 2017 09:33:56 +0000 (09:33 +0000)
* gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
and -mdata-region to the assembler.

From-SVN: r251449

gcc/ChangeLog
gcc/config/msp430/msp430.h

index 1879507..407b025 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
+
+       * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
+       and -mdata-region to the assembler.
+
 2017-08-30  Richard Biener  <rguenther@suse.de>
 
        * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
index 2bff249..e95106d 100644 (file)
@@ -58,12 +58,14 @@ extern bool msp430x;
   "%{!msim:-md} %{msim:%{mlarge:-md}} " /* Copy data from ROM to RAM if necessary.  */ \
   "%{msilicon-errata=*:-msilicon-errata=%*} " /* Pass on -msilicon-errata.  */ \
   "%{msilicon-errata-warn=*:-msilicon-errata-warn=%*} " /* Pass on -msilicon-errata-warn.  */ \
-  "%{ffunction-sections:-gdwarf-sections} " /* If function sections are being created then create DWARF line number sections as well.  */
+  "%{ffunction-sections:-gdwarf-sections} " /* If function sections are being created then create DWARF line number sections as well.  */ \
+  "%{mdata-region=*:-mdata-region=%*} " /* Pass on -mdata-region.  */
 
 /* Enable linker section garbage collection by default, unless we
    are creating a relocatable binary (gc does not work) or debugging
    is enabled  (the GDB testsuite relies upon unused entities not being deleted).  */
-#define LINK_SPEC "%{mrelax:--relax} %{mlarge:%{!r:%{!g:--gc-sections}}}"
+#define LINK_SPEC "%{mrelax:--relax} %{mlarge:%{!r:%{!g:--gc-sections}}} " \
+  "%{mcode-region=*:--code-region=%*} %{mdata-region=*:--data-region=%*}"
 
 extern const char * msp430_select_hwmult_lib (int, const char **);
 # define EXTRA_SPEC_FUNCTIONS                          \