From 2e4776031520e6d9fe583656a2a1b954bfee1ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Rivi=C3=A8re?= Date: Mon, 5 Nov 2012 22:48:04 +0000 Subject: [PATCH] Fixed *_before_copy labels when linking to .s19 --- BaS_GNU/bas.lk.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BaS_GNU/bas.lk.in b/BaS_GNU/bas.lk.in index 0ad968e..67d0114 100644 --- a/BaS_GNU/bas.lk.in +++ b/BaS_GNU/bas.lk.in @@ -75,6 +75,8 @@ SECTIONS { #endif } > flash +#define BAS_LABEL_LMA(x) ((x) + (ABSOLUTE(__BAS_LMA) - ABSOLUTE(__BAS_VMA))) + .bas _Bas_base : AT (ADDR(.text) + SIZEOF(.text)) { objs/BaS.o(.text) @@ -82,10 +84,10 @@ SECTIONS { objs/sd_card_asm.o(.text) objs/bas_printf.o(.text) objs/printf_helper.o(.text) - _xprintf_before_copy = _xprintf - (_BaS - LOADADDR(.bas)); - _display_progress_before_copy = _display_progress - (_BaS - LOADADDR(.bas)); + _xprintf_before_copy = BAS_LABEL_LMA(_xprintf); + _display_progress_before_copy = BAS_LABEL_LMA(_display_progress); objs/cache.o(.text) - _flush_and_invalidate_caches_before_copy = _flush_and_invalidate_caches - (_BaS - LOADADDR(.bas)); + _flush_and_invalidate_caches_before_copy = BAS_LABEL_LMA(_flush_and_invalidate_caches); objs/sd_card.o(.text) objs/mmu.o(.text) objs/exceptions.o(.text)