Add ARCv3's linker bits. Remove obsolete tests.
ld/
xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com>
* ld/Makefile.am: Add ARC64 targets.
* ld/configure.tgt: Likewise.
* ld/Makefile.in: Regenerate.
* ld/emulparams/arc64elf32.sh: New file.
* ld/emulparams/arc64elf64.sh: Likewise.
* ld/emulparams/arc64linux32.sh: Likewise.
* ld/emulparams/arc64linux64.sh: Likewise.
* ld/scripttempl/elfarc.sc: Update stack and heap definitions.
* ld/testsuite/ld-arc/got-weak.d: Deleted file.
* ld/testsuite/ld-arc/got-weak.s: Likewise.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
eaarch64nto.c \
eaarch64pe.c \
earm64pe.c \
+ earc64elf32.c \
+ earc64elf64.c \
+ earc64linux32.c \
+ earc64linux64.c \
eelf32_x86_64.c \
eelf32b4300.c \
eelf32bmip.c \
eaarch64nto.c \
eaarch64pe.c \
earm64pe.c \
+ earc64elf32.c \
+ earc64elf64.c \
+ earc64linux32.c \
+ earc64linux64.c \
eelf32_x86_64.c \
eelf32b4300.c \
eelf32bmip.c \
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixrs6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ealpha.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ealphavms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earc64elf32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earc64elf64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earc64linux32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earc64linux64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earcelf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earclinux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earclinux_nps.Po@am__quote@
;;
am33_2.0-*-linux*) targ_emul=elf32am33lin # mn10300 variant
;;
-arc*-*-elf*) targ_emul=arcelf
+arc-*-elf* | arc[be]*-*-elf*) targ_emul=arcelf
targ_extra_emuls="arclinux arclinux_nps arcv2elf arcv2elfx"
;;
-arc*-*-linux*) case "${with_cpu}" in
+arc64-*-elf*) targ_emul=arc64elf64
+ targ_extra_emuls="arc64elf32 arc64linux64 arc64linux32"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arc32-*-elf*) targ_emul=arc64elf32
+ targ_extra_emuls="arc64linux32 arc64elf64 arc64linux64"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arc64-*-linux*) targ_emul=arc64linux64
+ targ_extra_emuls="arc64elf64 arc64elf32 arc64linux32"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arc32-*-linux*) targ_emul=arc64linux32
+ targ_extra_emuls="arc64elf32 arc64elf64 arc64linux64"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arc-*-linux* | arc[eb]*-linux*)
+ case "${with_cpu}" in
nps400) targ_emul=arclinux_nps
targ_extra_emuls=arclinux
;;
--- /dev/null
+SCRIPT_NAME=elf
+ELFSIZE=32
+SCRIPT_NAME=elfarc
+TEMPLATE_NAME=elf
+OUTPUT_FORMAT="elf32-littlearc64"
+
+TEXT_START_ADDR=0x00
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+ARCH="arc64:32"
+ENTRY=__start
+EMBEDDED=yes
--- /dev/null
+SCRIPT_NAME=elf
+ELFSIZE=64
+SCRIPT_NAME=elfarc
+TEMPLATE_NAME=elf
+OUTPUT_FORMAT="elf64-littlearc64"
+
+TEXT_START_ADDR=0x00
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+ARCH="arc64:64"
+ENTRY=__start
+EMBEDDED=yes
--- /dev/null
+ARCH="arc64:32"
+
+SCRIPT_NAME=elf
+ELFSIZE=32
+OUTPUT_FORMAT="elf32-littlearc64"
+
+TEMPLATE_NAME=elf
+
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+
+TEXT_START_ADDR=0x10000
+
+ENTRY=__start
+
+# To support RELRO security feature.
+NO_SMALL_DATA=yes
+SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"
+GENERATE_COMBRELOC_SCRIPT=yes
--- /dev/null
+ARCH="arc64:64"
+
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-littlearc64"
+
+TEMPLATE_NAME=elf
+
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+
+TEXT_START_ADDR=0x10000
+
+ENTRY=__start
+
+# To support RELRO security feature.
+NO_SMALL_DATA=yes
+SEPARATE_GOTPLT=8 #FIXME! what is the true value here?
+GENERATE_COMBRELOC_SCRIPT=yes
The options appear in the wrong order to do this with a single symbol -
ldflags comes after flags injected with per-file stanzas, and thus
the setting from ldflags prevails. */
- .heap :
- {
- __start_heap = . ;
- . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) ;
- __end_heap = . ;
- }
-
- . = ALIGN(0x8);
- .stack :
- {
- __stack = . ;
- . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64k)) ;
- __stack_top = . ;
- }
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+ PROVIDE (__start_heap = .) ; }
+ ${RELOCATING+ PROVIDE (__stack_top = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20k)) + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : 64k));}
+ ${RELOCATING+ PROVIDE (__end_heap = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 20k)));}
EOF
source_sh $srcdir/scripttempl/misc-sections.sc
+++ /dev/null
-#source: got-weak.s
-#as:
-#ld: -Bstatic
-#objdump: -d
-
-[^:]*:\s+file format elf32-.*arc
-
-
-Disassembly of section \.text:
-
-[0-9a-f]+ <.*>:
-^\s+[0-9a-f]+:\s+2730\s7f80\s[0-9a-f]+\s[0-9a-f]+\s+ld\s+r\d+,\[pcl,.*
+++ /dev/null
- .cpu archs
-
- .weak symb
- .global __start
- .text
-__start:
- ld r0,[pcl,@symb@gotpc]