re PR target/30417 (Section .data cannot be moved with -mmcu=atmega88)
authorGeorg-Johann Lay <avr@gjlay.de>
Tue, 21 Jun 2016 10:36:13 +0000 (10:36 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Tue, 21 Jun 2016 10:36:13 +0000 (10:36 +0000)
PR target/30417
* config/avr/gen-avr-mmcu-specs.c (print_mcu):
[*link_data_start]: Wrap -Tdata into %{!Tdata:...}.
[*link_text_start]: Wrap -Ttext into %{!Ttext:...}.

From-SVN: r237639

gcc/ChangeLog
gcc/config/avr/gen-avr-mmcu-specs.c

index 7927454fdbaa9de9fe234dbbdf21236d80a278c2..7112623940c97d3f57ec9dd37af44d5b266dc812 100644 (file)
@@ -1,3 +1,10 @@
+2016-06-21  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/30417
+       * config/avr/gen-avr-mmcu-specs.c (print_mcu):
+       [*link_data_start]: Wrap -Tdata into %{!Tdata:...}.
+       [*link_text_start]: Wrap -Ttext into %{!Ttext:...}.
+
 2016-06-21  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/71103
index de8680a8a1bc8011e1db97fc97b08f01d2bacd00..fabe8c2c59b63da2cccc509613048bf4f94f110e 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "avr-devices.c"
 
-// Get rid of "defaults.h".  We just need tm.h for `WITH_AVRLIBS' and
+// Get rid of "defaults.h".  We just need tm.h for `WITH_AVRLIBC' and
 // and `WITH_RTEMS'.  */
 #define GCC_DEFAULTS_H
 
@@ -242,12 +242,13 @@ print_mcu (const avr_mcu_t *mcu)
       fprintf (f, "*link_data_start:\n");
       if (mcu->data_section_start
           != arch->default_data_section_start)
-        fprintf (f, "\t-Tdata 0x%lX", 0x800000UL + mcu->data_section_start);
+        fprintf (f, "\t%%{!Tdata:-Tdata 0x%lX}",
+                 0x800000UL + mcu->data_section_start);
       fprintf (f, "\n\n");
 
       fprintf (f, "*link_text_start:\n");
       if (mcu->text_section_start != 0x0)
-        fprintf (f, "\t-Ttext 0x%lX", 0UL + mcu->text_section_start);
+        fprintf (f, "\t%%{!Ttext:-Ttext 0x%lX}", 0UL + mcu->text_section_start);
       fprintf (f, "\n\n");
     }