diff options
Diffstat (limited to 'ld/scripttempl/elf32xc16xl.sc')
-rw-r--r-- | ld/scripttempl/elf32xc16xl.sc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ld/scripttempl/elf32xc16xl.sc b/ld/scripttempl/elf32xc16xl.sc index 545df67..0b47319 100644 --- a/ld/scripttempl/elf32xc16xl.sc +++ b/ld/scripttempl/elf32xc16xl.sc @@ -13,7 +13,10 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) -${RELOCATING+ENTRY ("_start")} +EOF + +test -n "${RELOCATING}" && cat <<EOF +ENTRY ("_start") MEMORY { vectarea : o =0xc00000, l = 0x0300 @@ -26,6 +29,9 @@ MEMORY ldata : o =0x4000 ,l = 0x0200 } +EOF + +cat <<EOF SECTIONS { /*.vects : @@ -39,15 +45,15 @@ SECTIONS .text : { - *(.rodata) - *(.text.*) + ${RELOCATING+*(.rodata)} + ${RELOCATING+*(.text.*)} *(.text) ${RELOCATING+ _etext = . ; } } ${RELOCATING+ > introm} .data : { *(.data) - *(.data.*) + ${RELOCATING+*(.data.*)} ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > dram} @@ -56,7 +62,7 @@ SECTIONS { ${RELOCATING+ _bss_start = . ;} *(.bss) - *(COMMON) + ${RELOCATING+*(COMMON)} ${RELOCATING+ _end = . ; } } ${RELOCATING+ > dram} |