+2019-04-10 Alan Modra <amodra@gmail.com>
+
+ * Makefile.am (eskyelf.c, eskyelf_linux.c): Depend on cskyelf.em.
+ (ecskyelf_linux.c): Depend on cskyelf.sh.
+ (eelf32microblazeel.c): Depend on elf32microblaze.sh.
+ * Makefile.in: Regenerate.
+ * emulparams/cskyelf.sh: Comment regarding cskelf_linux.sh.
+ (PAGE_SIZE): Don't define.
+ * emulparams/cskyelf_linux.sh: Source sckyelf.sh, leaving just
+ the differing variable defs/undefs.
+ * emulparams/elf32mcore.sh (PAGE_SIZE): Don't define.
+ * emulparams/elf32microblaze.sh: Comment re. elf32microblazeel.sh.
+ (OUTPUT_FORMAT): Use BIG_OUTPUT_FORMAT.
+ (PAGE_SIZE): Don't define.
+ * emulparams/elf32microblazeel.sh: Source elf32microblaze.sh,
+ leaving just the differing OUTPUT_FORMAT.
+
2019-04-10 Alan Modra <amodra@gmail.com>
* po/BLD-POTFILES.in: Regenerate.
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ecskyelf.c: $(srcdir)/emulparams/cskyelf.sh \
+ $(srcdir)/emultempl/cskyelf.em \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ecskyelf_linux.c: $(srcdir)/emulparams/cskyelf_linux.sh \
+ $(srcdir)/emulparams/cskyelf.sh $(srcdir)/emultempl/cskyelf.em \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf32microblazeel.c: $(srcdir)/emulparams/elf32microblazeel.sh \
+ $(srcdir)/emulparams/elf32microblaze.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
eelf32microblaze.c: $(srcdir)/emulparams/elf32microblaze.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ecskyelf.c: $(srcdir)/emulparams/cskyelf.sh \
+ $(srcdir)/emultempl/cskyelf.em \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ecskyelf_linux.c: $(srcdir)/emulparams/cskyelf_linux.sh \
+ $(srcdir)/emulparams/cskyelf.sh $(srcdir)/emultempl/cskyelf.em \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf32microblazeel.c: $(srcdir)/emulparams/elf32microblazeel.sh \
+ $(srcdir)/emulparams/elf32microblaze.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elfmicroblaze.sc ${GEN_DEPENDS}
eelf32microblaze.c: $(srcdir)/emulparams/elf32microblaze.sh \
+# If you change this file, please also look at files which source this one:
+# cskyelf_linux.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-csky-little"
BIG_OUTPUT_FORMAT="elf32-csky-big"
LITTLE_OUTPUT_FORMAT="elf32-csky-little"
NO_REL_RELOCS=yes
-PAGE_SIZE=0x1000
TARGET_PAGE_SIZE=0x400
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x8000
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-csky-little"
-BIG_OUTPUT_FORMAT="elf32-csky-big"
-LITTLE_OUTPUT_FORMAT="elf32-csky-little"
-NO_REL_RELOCS=yes
-TARGET_PAGE_SIZE=0x400
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+. ${srcdir}/emulparams/cskyelf.sh
+
+unset EMBEDDED
+unset ENTRY
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-CHECK_RELOCS_AFTER_OPEN_INPUT=yes
-TEXT_START_ADDR=0x8000
-NONPAGED_TEXT_START_ADDR=0
-ARCH=csky
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
-
-# There is a problem with the NOP value - it must work for both
-# big endian and little endian systems. Unfortunately there is
-# no symmetrical mcore opcode that functions as a noop. The
-# chosen solution is to use "tst r0, r14". This is a symmetrical
-# value, and apart from the corruption of the C bit, it has no other
-# side effects. Since the carry bit is never tested without being
-# explicitly set first, and since the NOP code is only used as a
-# fill value between independently viable pieces of code, it should
-# not matter.
-NOP=0
-
-OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
-OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
-
-# This sets the stack to the top of the simulator memory (2^19 bytes).
-# STACK_ADDR=0x80000
-
-TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_COMBRELOC_SCRIPT=yes
-EXTRA_EM_FILE=cskyelf
BIG_OUTPUT_FORMAT="elf32-mcore-big"
LITTLE_OUTPUT_FORMAT="elf32-mcore-little"
NO_REL_RELOCS=yes
-PAGE_SIZE=0x1000
TARGET_PAGE_SIZE=0x400
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0
+# If you change this file, please also look at files which source this one:
+# elf32microblazeel.sh
SCRIPT_NAME=elfmicroblaze
-OUTPUT_FORMAT="elf32-microblaze"
BIG_OUTPUT_FORMAT="elf32-microblaze"
LITTLE_OUTPUT_FORMAT="elf32-microblazeel"
+OUTPUT_FORMAT=$BIG_OUTPUT_FORMAT
#TEXT_START_ADDR=0
NONPAGED_TEXT_START_ADDR=0x28
ALIGNMENT=4
# Hmmm, there's got to be a better way. This sets the stack to the
# top of the simulator memory (2^19 bytes).
-#PAGE_SIZE=0x1000
#DATA_ADDR=0x10000
#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }'
#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@}
-SCRIPT_NAME=elfmicroblaze
-OUTPUT_FORMAT="elf32-microblazeel"
-BIG_OUTPUT_FORMAT="elf32-microblaze"
-LITTLE_OUTPUT_FORMAT="elf32-microblazeel"
-#TEXT_START_ADDR=0
-NONPAGED_TEXT_START_ADDR=0x28
-ALIGNMENT=4
-MAXPAGESIZE=4
-ARCH=microblaze
-EMBEDDED=yes
-
-NOP=0x80000000
-
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-#PAGE_SIZE=0x1000
-#DATA_ADDR=0x10000
-#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }'
-#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@}
-#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);'
-
-TEMPLATE_NAME=elf32
-#GENERATE_SHLIB_SCRIPT=yes
+. ${srcdir}/emulparams/elf32microblaze.sh
+OUTPUT_FORMAT=$LITTLE_OUTPUT_FORMAT