MIPS: remove OUTPUT_FORMAT from linker scripts

The OUTPUT_FORMAT command in linker scripts
was always misused due to some endianess and
toolchain problems.

Use GCC flags to ensure proper output format,
and get rid of the OUTPUT_FORMAT commands in
the board specific u-boot.lds files.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
master
Gabor Juhos 12 years ago committed by Daniel Schwierzeck
parent 6d86227880
commit 9950b90d38
  1. 6
      arch/mips/cpu/mips32/config.mk
  2. 6
      arch/mips/cpu/xburst/config.mk
  3. 4
      board/dbau1x00/u-boot.lds
  4. 4
      board/incaip/u-boot.lds
  5. 1
      board/micronas/vct/u-boot.lds
  6. 4
      board/pb1x00/u-boot.lds
  7. 8
      board/qemu-mips/u-boot.lds
  8. 2
      board/qi/qi_lb60/u-boot.lds

@ -30,5 +30,11 @@
MIPSFLAGS := -march=mips32r2 MIPSFLAGS := -march=mips32r2
PLATFORM_CPPFLAGS += $(MIPSFLAGS) PLATFORM_CPPFLAGS += $(MIPSFLAGS)
PLATFORM_CPPFLAGS += -mabi=32 -DCONFIG_32BIT
ifdef CONFIG_SYS_BIG_ENDIAN
PLATFORM_LDFLAGS += -m elf32btsmip
else
PLATFORM_LDFLAGS += -m elf32ltsmip
endif
CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds

@ -21,5 +21,11 @@
# #
PLATFORM_CPPFLAGS += -march=mips32 PLATFORM_CPPFLAGS += -march=mips32
PLATFORM_CPPFLAGS += -mabi=32 -DCONFIG_32BIT
ifdef CONFIG_SYS_BIG_ENDIAN
PLATFORM_LDFLAGS += -m elf32btsmip
else
PLATFORM_LDFLAGS += -m elf32ltsmip
endif
CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds

@ -21,10 +21,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
*/
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

@ -21,10 +21,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
*/
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

@ -21,7 +21,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

@ -21,10 +21,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
*/
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips")
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

@ -21,14 +21,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
*/
#if defined(CONFIG_64BIT)
OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips")
#else
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
#endif
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

@ -18,8 +18,6 @@
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips")
OUTPUT_ARCH(mips) OUTPUT_ARCH(mips)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS

Loading…
Cancel
Save