mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 19:14:52 +08:00
Fix some ld dependencies
In looking at the csky-elf vs. csky-linux differences, the first thing I compared was csky_elf.sh and cskyelf_linux.sh. Those files are mostly the same but besides the real differences, annoyingly have some lines ordered differently. It's better in such cases to have one file source the other, making differences plain. This patch does that for csky and microblaze, removes an unused variable defined in a few places, and fixes ld makefile dependencies. * 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.
This commit is contained in:
parent
6feda62721
commit
c55b17b809
17
ld/ChangeLog
17
ld/ChangeLog
@ -1,3 +1,20 @@
|
||||
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.
|
||||
|
@ -879,9 +879,11 @@ ecrislinux.c: $(srcdir)/emulparams/crislinux.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 \
|
||||
@ -1178,6 +1180,7 @@ eelf32metag.c: $(srcdir)/emulparams/elf32metag.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 \
|
||||
|
@ -2482,9 +2482,11 @@ ecrislinux.c: $(srcdir)/emulparams/crislinux.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 \
|
||||
@ -2781,6 +2783,7 @@ eelf32metag.c: $(srcdir)/emulparams/elf32metag.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 \
|
||||
|
@ -1,9 +1,10 @@
|
||||
# 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
|
||||
|
@ -1,36 +1,9 @@
|
||||
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
|
||||
|
@ -3,7 +3,6 @@ OUTPUT_FORMAT="elf32-mcore-little"
|
||||
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
|
||||
|
@ -1,7 +1,9 @@
|
||||
# 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
|
||||
@ -13,7 +15,6 @@ 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);@}
|
||||
|
@ -1,23 +1,2 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user