summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/lpc17xx/ldscript20
-rw-r--r--target-rules.mk4
2 files changed, 7 insertions, 17 deletions
diff --git a/arch/arm/lpc17xx/ldscript b/arch/arm/lpc17xx/ldscript
index 2a1ce2b..677d063 100644
--- a/arch/arm/lpc17xx/ldscript
+++ b/arch/arm/lpc17xx/ldscript
@@ -54,6 +54,7 @@ SECTIONS
{
.text :
{
+ . = ALIGN(32);
CREATE_OBJECT_SYMBOLS
__cs3_region_start_rom = .;
__privileged_code_start__ = . ;
@@ -73,14 +74,8 @@ SECTIONS
*( .privileged_code )
*( privileged_functions )
-
- __privileged_code_end___len = . - __privileged_code_start__ - 1 ;
- __privileged_code_end___len |= __privileged_code_end___len >> 1 ;
- __privileged_code_end___len |= __privileged_code_end___len >> 2 ;
- __privileged_code_end___len |= __privileged_code_end___len >> 4 ;
- __privileged_code_end___len |= __privileged_code_end___len >> 8 ;
- __privileged_code_end___len |= __privileged_code_end___len >> 16 ;
- . = ALIGN( MAX( __privileged_code_end___len + 1, 32 ) ) ;
+
+ . = ALIGN(32);
__privileged_code_end__ = .;
__privileged_functions_end__ = .;
@@ -163,17 +158,12 @@ SECTIONS
.data :
{
+ . = ALIGN(32);
__cs3_region_start_ram = .;
__ram_data_begin = .;
__privileged_data_start__ = .;
*( privileged_data )
- __privileged_data_end___len = . - __privileged_data_start__ - 1 ;
- __privileged_data_end___len |= __privileged_data_end___len >> 1 ;
- __privileged_data_end___len |= __privileged_data_end___len >> 2 ;
- __privileged_data_end___len |= __privileged_data_end___len >> 4 ;
- __privileged_data_end___len |= __privileged_data_end___len >> 8 ;
- __privileged_data_end___len |= __privileged_data_end___len >> 16 ;
- . = ALIGN( MAX( __privileged_data_end___len + 1, 32 ) ) ;
+ . = ALIGN(32);
__privileged_data_end__ = .;
*(.cs3.region-head.ram)
diff --git a/target-rules.mk b/target-rules.mk
index a2bd0fc..e7e3be6 100644
--- a/target-rules.mk
+++ b/target-rules.mk
@@ -15,9 +15,9 @@ TARGET_MAP = $(addsuffix .map, $(basename $(TARGET)))
TARGET_OBJS += $(addsuffix .o, $(basename $(TARGET)))
endif
-$(TARGET_ELF): $(TARGET_OBJS) $(LIBDEPS)
+$(TARGET_ELF): $(TARGET_OBJS) $(LIBDEPS) $(LDSCRIPT)
$(E) "[TL] Linking $@"
- $(Q)$(TARGET_LD) -Wl,--gc-sections -Wl,-O3 -Wl,-Map=$(TARGET_MAP) -o $@ $^ -T$(LDSCRIPT) $(LIBS)
+ $(Q)$(TARGET_LD) -Wl,--gc-sections -Wl,-O3 -Wl,-Map=$(TARGET_MAP) -o $@ $(TARGET_OBJS) -T$(LDSCRIPT) $(LIBS)
$(TARGET_MAP): $(TARGET_ELF)