diff options
author | Nick Clifton <nickc@redhat.com> | 2022-11-03 09:17:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-11-03 09:17:41 +0000 |
commit | fa6895ad35ebfa6a9e69808da0bae249d9b8a638 (patch) | |
tree | 9dff3e50525fbce9af0e9e8965d84f51a416c51c /ld/scripttempl | |
parent | a1af8f405cfa5bdb8c521768d662e322fc8dde63 (diff) | |
download | binutils-fa6895ad35ebfa6a9e69808da0bae249d9b8a638.zip binutils-fa6895ad35ebfa6a9e69808da0bae249d9b8a638.tar.gz binutils-fa6895ad35ebfa6a9e69808da0bae249d9b8a638.tar.bz2 |
AVR Linker: Allow the start of the data region to specified on the command line.
PR 29471
* scripttempl/avr.sc (__DATA_REGION_ORIGIN__): Define. If a value
has not been provided on the command line then use DATA_ORIGIN.
(MEMORY): Use __DATA_REGION_ORIGIN__ as the start of the data region.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/avr.sc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index 026871f..f8e690d 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -28,7 +28,9 @@ EOF test -n "${RELOCATING}" && cat <<EOF __TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : $TEXT_LENGTH; +__DATA_REGION_ORIGIN__ = DEFINED(__DATA_REGION_ORIGIN__) ? __DATA_REGION_ORIGIN__ : $DATA_ORIGIN; __DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : $DATA_LENGTH; + ${EEPROM_LENGTH+__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : $EEPROM_LENGTH;} __FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : $FUSE_LENGTH; __LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : $LOCK_LENGTH; @@ -38,7 +40,7 @@ ${RODATA_PM_OFFSET+__RODATA_PM_OFFSET__ = DEFINED(__RODATA_PM_OFFSET__) ? __RODA MEMORY { text (rx) : ORIGIN = 0, LENGTH = __TEXT_REGION_LENGTH__ - data (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = __DATA_REGION_LENGTH__ + data (rw!x) : ORIGIN = __DATA_REGION_ORIGIN__, LENGTH = __DATA_REGION_LENGTH__ ${EEPROM_LENGTH+ eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__} $FUSE_NAME (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__ lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__ |