summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/Makefile8
-rw-r--r--examples/standalone/mips.lds42
-rw-r--r--examples/standalone/mips64.lds42
3 files changed, 5 insertions, 87 deletions
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 09364d84a0a..f01816f24f4 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -45,6 +45,8 @@ endif
# source file.
ccflags-y += $(call cc-option,-fno-toplevel-reorder)
+LDFLAGS_STANDALONE += -Ttext $(CONFIG_STANDALONE_LOAD_ADDR)
+
#########################################################################
quiet_cmd_link_lib = LD $@
@@ -54,17 +56,17 @@ $(LIB): $(LIBOBJS) FORCE
$(call if_changed,link_lib)
quiet_cmd_link_elf = LD $@
- cmd_link_elf = $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
+ cmd_link_elf = $(LD) $(LDFLAGS) $(LDFLAGS_STANDALONE) -g \
-o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) $(PLATFORM_LIBGCC)
$(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE
$(call if_changed,link_elf)
-$(obj)/%.srec: OBJCOPYFLAGS := -O srec
+$(obj)/%.srec: OBJCOPYFLAGS += -O srec
$(obj)/%.srec: $(obj)/% FORCE
$(call if_changed,objcopy)
-$(obj)/%.bin: OBJCOPYFLAGS := -O binary
+$(obj)/%.bin: OBJCOPYFLAGS += -O binary
$(obj)/%.bin: $(obj)/% FORCE
$(call if_changed,objcopy)
diff --git a/examples/standalone/mips.lds b/examples/standalone/mips.lds
deleted file mode 100644
index 163d6efefd8..00000000000
--- a/examples/standalone/mips.lds
+++ /dev/null
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2003
- * Wolfgang Denk Engineering, <[email protected]>
- */
-
-/*
-OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
-*/
-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
-OUTPUT_ARCH(mips)
-SECTIONS
-{
- .text :
- {
- *(.text*)
- }
-
- . = ALIGN(4);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
- . = ALIGN(4);
- .data : { *(.data*) }
-
- . = .;
- _gp = ALIGN(16) + 0x7ff0;
-
- .got : {
- __got_start = .;
- *(.got)
- __got_end = .;
- }
-
- .sdata : { *(.sdata*) }
-
- . = ALIGN(4);
- __bss_start = .;
- .sbss (NOLOAD) : { *(.sbss*) }
- .bss (NOLOAD) : { *(.bss*) . = ALIGN(4); }
-
- _end = .;
-}
diff --git a/examples/standalone/mips64.lds b/examples/standalone/mips64.lds
deleted file mode 100644
index d67396ab713..00000000000
--- a/examples/standalone/mips64.lds
+++ /dev/null
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2003
- * Wolfgang Denk Engineering, <[email protected]>
- */
-
-/*
-OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
-*/
-OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips")
-OUTPUT_ARCH(mips)
-SECTIONS
-{
- .text :
- {
- *(.text*)
- }
-
- . = ALIGN(4);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
- . = ALIGN(4);
- .data : { *(.data*) }
-
- . = .;
- _gp = ALIGN(16) + 0x7ff0;
-
- .got : {
- __got_start = .;
- *(.got)
- __got_end = .;
- }
-
- .sdata : { *(.sdata*) }
-
- . = ALIGN(4);
- __bss_start = .;
- .sbss (NOLOAD) : { *(.sbss*) }
- .bss (NOLOAD) : { *(.bss*) . = ALIGN(4); }
-
- _end = .;
-}