Georg-Johann Lay
6490dc678b
Replace multiple AVR scripts with a single, customizable linker script.
...
PR ld/21569
* scripttempl/avrtiny.sc: Remove file.
* Makefile.am (eavrtiny.c): Depend on avr.sc, no more on avrtiny.sc.
* Makefile.in: Regenerate.
* emulparams/avrtiny.sh (SCRIPT_NAME): Set var to "avr".
(TEXT_ORIGIN): Remove var.
(FUSE_NAME, FUSE_LENGTH, LOCK_LENGTH, SIGNATURE_LENGTH)
(RODATA_PM_OFFSET): Set new vars.
* emulparams/avr1.sh (FUSE_NAME, EEPROM_LENGTH, FUSE_LENGTH)
(LOCK_LENGTH, SIGNATURE_LENGTH, USER_SIGNATURE_LENGTH): Set new vars.
* emulparams/avr2.sh: Same.
* emulparams/avr25.sh: Same.
* emulparams/avr3.sh: Same.
* emulparams/avr31.sh: Same.
* emulparams/avr35.sh: Same.
* emulparams/avr4.sh: Same.
* emulparams/avr5.sh: Same.
* emulparams/avr51.sh: Same.
* emulparams/avr6.sh: Same.
* emulparams/avrxmega1.sh: Same.
* emulparams/avrxmega2.sh: Same.
* emulparams/avrxmega3.sh: Same.
* emulparams/avrxmega4.sh: Same.
* emulparams/avrxmega5.sh: Same.
* emulparams/avrxmega6.sh: Same.
* emulparams/avrxmega7.sh: Same.
* scripttempl/avr.sc (__EEPROM_REGION_LENGTH__): Only define
if EEPROM_LENGTH is set.
(MEMORY) [eeprom]: Same.
(SECTIONS) [.eeprom]: Same for output section.
(__USER_SIGNATURE_REGION_LENGTH__): Only define if
USER_SIGNATURE_LENGTH is set.
(MEMORY) [user_signatures]: Same.
(SECTIONS) [.fuse]: Only define output section if FUSE_NAME = fuse.
(SECTIONS) [.config]: Only define output section if FUSE_NAME = config.
2017-06-13 16:50:26 +01:00
eorg-Johann Lay
f4203b2b88
Update avrxmega3 linker emulation to support avrxmega2 devices with flash memory visible in the SRAM address range.
...
PR ld/21472
ld * emulparams/avrxmega3.sh (RODATA_PM_OFFSET): Set to 0x8000.
* scripttempl/avr.sc
(__RODATA_PM_OFFSET__) [RODATA_PM_OFFSET]: Use RODATA_PM_OFFSET
as default if not already defined.
(.data) [!RODATA_PM_OFFSET]: Don't include .rodata and friends.
(.rodata) [RODATA_PM_OFFSET]: Put at an offset of
__RODATA_PM_OFFSET__.
gas * config/tc-avr.c (mcu_types): Add entries for: attiny416,
attiny417, attiny816, attiny817.
2017-05-19 15:06:33 +01:00
Alan Modra
2571583aed
Update year range in copyright notice of all files.
2017-01-02 14:08:56 +10:30
Senthil Kumar Selvaraj
1bdc036f25
Place progmem data from AVR's libc before other progmem data.
...
* scripttempl/avr.sc (text): Place .progmem.data from avr-libc
above .progmem*.
* scripttempl/avrtiny.sc (text): Likewise.
2016-05-17 13:14:26 +01:00
Denis Chertykov
7585b2b8b6
Prevent .noinit section from incorrect placement for AVR.
...
When .data and .bss sections are empty .noinit section is placed at data
region's start. This will be incorrect for devices that has different
data start address than data region start in linker script.
The patch updates .noinit section's VMA to end of .bss section. So, .noinit
section will be placed at .data section address (-Tdata=<address>) when .data
and .bss sections are empty.
ld/
* scripttempl/avr.sc (.noinit): Force .noinit VMA to end of .bss VMA.
* scripttempl/avrtiny.sc (.noinit): Likewise.
2016-01-25 22:33:25 +03:00
Alan Modra
6f2750feaf
Copyright update for binutils
2016-01-01 23:00:01 +10:30
Senthil Kumar Selvaraj
cb0728165e
This patch modifies the AVR linker script templates to use __<name>_REGION_LENGTH__ symbols, if provided, for setting memory region lengths, defaulting to the current constant values otherwise.
...
ld * scripttempl/avr.sc: Add new user_signatures region. Define and Use
symbols for all region lengths.
* scripttempl/avrtiny.sc: Define and use symbols for all region lengths.
testsuite * ld-avr/region_overflow.d: New test.
* ld-avr/region_overflow.s: Likewise.
2015-02-24 11:26:28 +00:00
Alan Modra
b90efa5b79
ChangeLog rotatation and copyright year update
2015-01-02 00:53:45 +10:30
Nick Clifton
985743c7fb
Add copyright notice to linker script files.
2014-08-20 10:34:58 +01:00
Denis Chertykov
b484180108
* scripttempl/avr.sc: Remove KEEP for .data and
...
force .bss VMA to end of .data VMA.
2014-07-08 20:15:18 +04:00
Senthil Kumar Selvaraj
5ed365b417
* scripttempl/avr.sc: Set .data section's LMA to next available
...
address in text region.
2013-11-22 12:00:55 +00:00
Nick Clifton
8c661d24dc
Fix typo.
2013-08-23 15:21:53 +00:00
Nick Clifton
865acd3586
PR ld/15839
...
* scripttempl/avr.sc: Do not include gc'able sections into general
sections during relocatable links.
2013-08-23 07:37:31 +00:00
Thomas Schwinge
d061dfac16
ld/
...
* scripttempl/armbpabi.sc: Replace "source" usage with ".".
* scripttempl/avr.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
2013-04-28 14:52:55 +00:00
Nick Clifton
778ee4a6f2
* scripttempl/avr.sc: Add ALIGN directive after *(.progmem*).
2013-04-26 15:27:55 +00:00
Nick Clifton
2cfa18a94a
PR ld/15389
...
* scripttempl/avr.sc: Add .note.gnu.build-id section.
2013-04-24 15:28:12 +00:00
Nick Clifton
ceb0a680b1
* scripttempl/armbpabi.sc: Replace DWARF sections with an
...
inclusion of DWARF.sc.
* scripttempl/avr.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/DWARF.sc: New.
2013-04-15 08:51:58 +00:00
Nick Clifton
861319c9dd
PR ld/13812
...
* scripttempl/avr.sc: Place trampolines before .progmem section.
2013-03-27 13:21:38 +00:00
Nick Clifton
b176ded116
PR ld/15037
...
* scripttempl/avr.sc (.eeprom): Keep it.
2013-01-23 11:56:02 +00:00
Nick Clifton
2a995fc189
* scripttempl/alphavms.sc: Add .debug_macro section.
...
* scripttempl/elf.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/armbpabi.sc: Add .debug_pubtypes, .debug_ranges and
.debug_macro sections.
* scripttempl/avr.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
2012-06-29 07:58:46 +00:00
Nick Clifton
fef632e18b
PR 13697
...
* scripttempl/avr.sc (.data): Keep it.
2012-06-07 16:53:10 +00:00
Eric B. Weddington
ef844a53d2
2011-03-21 Eric B. Weddington <eric.weddington@atmel.com>
...
* scripttempl/avr.sc: Add fuse, lock, and signature memory regions.
2011-03-21 20:07:42 +00:00
Alan Modra
09b910c68c
* scripttempl/armbpabi.sc: Revert 2010-11-02 H.J. Lu.
...
* scripttempl/avr.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/elf.sc: Revert 2010-10-29 H.J. Lu.
2011-02-10 08:18:58 +00:00
H.J. Lu
34734a010b
Include compressed DWARF debug sections in ELF linker scripts.
...
binutils/testsuite/
2010-11-02 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/libdw2.out: Also accept MIPS_DWARF.
ld/
2010-11-02 H.J. Lu <hongjiu.lu@intel.com>
* scripttempl/armbpabi.sc: Include compressed DWARF debug
sections.
* scripttempl/avr.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
ld/testsuite/
2010-11-02 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/compress1a.d: Also check MIPS_DWARF.
* ld-elf/compress1b.d: Likewise.
* ld-elf/compress1c.d: Likewise.
2010-11-02 13:47:44 +00:00
Alan Modra
ec2d9b2927
Revert 2009-09-28 changes.
2009-10-10 04:34:39 +00:00
Alan Modra
df381c72f4
* scripttempl/elf32cr16.sc: Emit empty script for ld -r and ld -Ur.
...
* scripttempl/elf32cr16c.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/tic54xcoff.sc: Likewise.
* scripttempl/aix.sc: Delete ${RELOCATING-0}.
* scripttempl/avr.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf32msp430_3.sc: Likewise.
* scripttempl/elf32sh-symbian.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfi370.sc: Likewise.
* scripttempl/nw.sc: Likewise.
* scripttempl/psos.sc: Likewise.
* scripttempl/armbpabi.sc: Delete ${RELOCATING-0} and ${CONSTRUCTING-0}.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfmicroblaze.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
2009-09-28 07:08:50 +00:00
Nick Clifton
84f1b567bb
* scripttempl/avr.sc (MEMORY): Use DATA_ORIGIN.
...
* emulparams/avr1.sh (DATA_ORIGIN): Add.
* emulparams/avr2.sh (DATA_ORIGIN): Add.
* emulparams/avr25.sh (DATA_ORIGIN): Add.
* emulparams/avr3.sh (DATA_ORIGIN): Add.
* emulparams/avr31.sh (DATA_ORIGIN): Add.
* emulparams/avr35.sh (DATA_ORIGIN): Add.
* emulparams/avr4.sh (DATA_ORIGIN): Add.
* emulparams/avr5.sh (DATA_ORIGIN): Add.
* emulparams/avr51.sh (DATA_ORIGIN): Add.
(DATA_LENGTH): Update.
* emulparams/avr6.sh (DATA_ORIGIN): Add.
(DATA_LENGTH): Update.
2009-05-05 11:28:36 +00:00
Alan Modra
f265bc0660
PR 6943
...
* scripttempl/avr.sc (.bss): Set lma when relocating.
(.bss, .noinit): No need to set vma when relocating.
(.text, .bss, ,noinit): Set vma to zero when not relocating.
2008-10-05 04:12:04 +00:00
Nick Clifton
28c9d252b4
Add support for AVR6 family
2006-05-24 07:36:12 +00:00
Nick Clifton
df406460e9
Add linker relaxation support for the AVR
2006-03-03 15:25:31 +00:00
Marek Michalkiewicz
e21059f29c
* scripttempl/avr.sc: Do not set LMA for "eeprom" section.
2004-05-08 21:52:56 +00:00
Marek Michalkiewicz
0c9b4fee1c
* scripttempl/avr.sc: Changes to support current GCC and avr-libc,
...
C++ constructors/destructors, loosely based on the m68hc11 port.
2002-06-01 23:28:59 +00:00
Marek Michalkiewicz
7c8bf1e82a
* emulparams/avr1.sh: New file.
...
* emulparams/avr2.sh: New file.
* emulparams/avr3.sh: New file.
* emulparams/avr4.sh: New file.
* emulparams/avr5.sh: New file.
* scripttempl/avr.sc: New file.
2002-05-16 19:51:08 +00:00