diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2016-06-21 10:36:13 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2016-06-21 10:36:13 +0000 |
commit | e9305990d98af36affb5ee11d9060915f1f3890c (patch) | |
tree | 3690c4073f851510434dba7cae5767cd387a29bc | |
parent | 4e1eac56b437f28903bfd95daf11fee1c1ca74aa (diff) | |
download | gcc-e9305990d98af36affb5ee11d9060915f1f3890c.zip gcc-e9305990d98af36affb5ee11d9060915f1f3890c.tar.gz gcc-e9305990d98af36affb5ee11d9060915f1f3890c.tar.bz2 |
re PR target/30417 (Section .data cannot be moved with -mmcu=atmega88)
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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/avr/gen-avr-mmcu-specs.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7927454..7112623 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 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 * config/avr/avr.md (movqi): Only handle loading subreg:qi of constant addresses if can_create_pseudo_p. diff --git a/gcc/config/avr/gen-avr-mmcu-specs.c b/gcc/config/avr/gen-avr-mmcu-specs.c index de8680a..fabe8c2 100644 --- a/gcc/config/avr/gen-avr-mmcu-specs.c +++ b/gcc/config/avr/gen-avr-mmcu-specs.c @@ -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"); } |