+2016-04-05 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * emulparams/arc-endianness.sh: New file.
+ * emulparams/arcebelf.sh: Deleted.
+ * emulparams/arcebelf_prof.sh: Deleted.
+ * emulparams/arceblinux.sh: Deleted.
+ * emulparams/arceblinux_prof.sh: Deleted.
+ * emulparams/arcelf.sh: Include arc-endinness.sh.
+ * emulparams/arcelf_prof.sh: Include arc-endinness.sh.
+ * emulparams/arclinux.sh: Include arc-endinness.sh.
+ * emulparams/arclinux_prof.sh: Include arc-endinness.sh.
+ * emulparams/arcv2elf.sh: Include arc-endinness.sh.
+ * emulparams/arcv2elfx.sh: Include arc-endinness.sh.
+ * testsuite/ld-elf/compressed1d.d: Update pattern for big and
+ little endian arc targets.
+ * testsuite/ld-elf/eh-frame-hdr.d: Likewise.
+ * testsuite/ld-elf/group1.d: Likewise.
+ * testsuite/ld-elf/group3b.d: Likewise.
+ * testsuite/ld-elf/group8a.d: Likewise.
+ * testsuite/ld-elf/group8b.d: Likewise.
+ * testsuite/ld-elf/group9a.d: Likewise.
+ * testsuite/ld-elf/group9b.d: Likewise.
+ * testsuite/ld-elf/linkonce2.d: Likewise.
+ * testsuite/ld-elf/pr12851.d: Likewise.
+ * testsuite/ld-elf/pr12975.d: Likewise.
+ * testsuite/ld-elf/pr13177.d: Likewise.
+ * testsuite/ld-elf/pr13195.d: Likewise.
+ * testsuite/ld-elf/pr17615.d: Likewise.
+ * testsuite/ld-elf/pr19162.d: Likewise.
+ * testsuite/ld-elf/sec64k.exp: Likewise.
+ * testsuite/lib/ld-lib.exp: Likewise.
+
2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
PR ld/19908
--- /dev/null
+case ${target} in
+ arceb-*)
+ ARC_ENDIAN="big"
+ ;;
+ arc-*)
+ ARC_ENDIAN="little"
+ ;;
+ *)
+ exit 1
+esac
+++ /dev/null
-SCRIPT_NAME=elfarc
-TEMPLATE_NAME=elf32
-OUTPUT_FORMAT="elf32-bigarc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-# leave room for vector table, 32 vectors * 8 bytes
-TEXT_START_ADDR=0x100
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-#NONPAGED_TEXT_START_ADDR=0x0
-ARCH=arc
-MACHINE=
-ENTRY=__start
-SDATA_START_SYMBOLS='__SDATA_BEGIN__ = .;'
-OTHER_SECTIONS="/DISCARD/ : { *(.__arc_profile_*) }"
-EMBEDDED=yes
+++ /dev/null
-SCRIPT_NAME=elfarc
-TEMPLATE_NAME=elf32
-OUTPUT_FORMAT="elf32-bigarc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-# leave room for vector table, 32 vectors * 8 bytes
-TEXT_START_ADDR=0x100
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-#NONPAGED_TEXT_START_ADDR=0x0
-ARCH=arc
-MACHINE=
-ENTRY=__start
-SDATA_START_SYMBOLS='__SDATA_BEGIN__ = .;'
-OTHER_READONLY_SECTIONS="
- .__arc_profile_desc ${RELOCATING-0} : { *(.__arc_profile_desc) }
- .__arc_profile_forward ${RELOCATING-0} : { *(.__arc_profile_forward) }
-"
-OTHER_BSS_SECTIONS="
- .__arc_profile_counters ${RELOCATING-0} : { *(.__arc_profile_counters) }
-"
-EMBEDDED=yes
+++ /dev/null
-SCRIPT_NAME=arclinux
-OUTPUT_FORMAT="elf32-bigarc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-TEXT_START_ADDR=0x10000
-MAXPAGESIZE=0x2000
-COMMONPAGESIZE=0x2000
-NONPAGED_TEXT_START_ADDR=0x10000
-ARCH=arc
-MACHINE=
-ENTRY=__start
-TEMPLATE_NAME=arclinux
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=arclinux
-GENERATE_SHLIB_SCRIPT=yes
-SDATA_START_SYMBOLS='__SDATA_BEGIN__ = .;'
-OTHER_SECTIONS="/DISCARD/ : { *(.__arc_profile_*) }"
+++ /dev/null
-SCRIPT_NAME=arclinux
-OUTPUT_FORMAT="elf32-bigarc"
-LITTLE_OUTPUT_FORMAT="elf32-littlearc"
-BIG_OUTPUT_FORMAT="elf32-bigarc"
-TEXT_START_ADDR=0x10000
-MAXPAGESIZE=0x2000
-COMMONPAGESIZE=0x2000
-NONPAGED_TEXT_START_ADDR=0x10000
-ARCH=arc
-MACHINE=
-ENTRY=__start
-TEMPLATE_NAME=arclinux
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=arclinux
-GENERATE_SHLIB_SCRIPT=yes
-SDATA_START_SYMBOLS='__SDATA_BEGIN__ = .;'
-OTHER_READONLY_SECTIONS="
- .__arc_profile_desc ${RELOCATING-0} : { *(.__arc_profile_desc) }
- .__arc_profile_forward ${RELOCATING-0} : { *(.__arc_profile_forward) }
-"
-OTHER_BSS_SECTIONS="
- .__arc_profile_counters ${RELOCATING-0} : { *(.__arc_profile_counters) }
-"
+. ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
TEMPLATE_NAME=elf32
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
+. ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
TEMPLATE_NAME=elf32
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
+. ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=arclinux
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
OUTPUT_FORMAT="elf32-bigarc"
+. ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=arclinux
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
OUTPUT_FORMAT="elf32-bigarc"
+. ${srcdir}/emulparams/arc-endianness.sh
MACHINE=
SCRIPT_NAME=elfarcv2
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
+. ${srcdir}/emulparams/arc-endianness.sh
MACHINE=
SCRIPT_NAME=elfarcv2
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
#as: --compress-debug-sections=none
#ld: -r --compress-debug-sections=zlib-gnu
#readelf: -SW
-#notarget: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
# Not all ELF targets use the elf.em emulation...
#failif
#ld: -e _start --eh-frame-hdr
#objdump: -hw
#target: cfi
-#xfail: arc-*-elf* avr*-*-* or1k*-*-elf or1k*-*-rtems* visium-*-*
+#xfail: arc*-*-elf* avr*-*-* or1k*-*-elf or1k*-*-rtems* visium-*-*
# These targets support CFI generation but not shared libraries.
#...
[0-9] .eh_frame_hdr 0*[12][048c] .*
#source: group3a.s
#ld: -T group.ld
#readelf: -s
-#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
# generic linker targets don't comply with all symbol merging rules
Symbol table '.symtab' contains .* entries:
#source: group8.s
#ld: -r --gc-sections --entry foo
#readelf: -g --wide
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
#xfail: cr16-*-* crx-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#source: group8.s
#ld: -r --gc-sections --entry bar
#readelf: -g --wide
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
#xfail: cr16-*-* crx-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#source: group9.s
#ld: -r --gc-sections --entry foo
#readelf: -g --wide
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
#xfail: cr16-*-* crx-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#source: group9.s
#ld: -r --gc-sections --entry bar
#readelf: -g --wide
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
#xfail: cr16-*-* crx-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#source: linkonce1b.s
#ld: -emit-relocs
#objdump: -r
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
# generic elf targets don't emit relocs
.*: file format .*
#source: start.s
#ld: --gc-sections
#readelf: -s --wide
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#ld: --gc-sections -shared -version-script pr12975.t
#readelf: -s --wide
#target: *-*-linux* *-*-gnu*
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#ld: --gc-sections -shared
#readelf: -s -D --wide
#target: *-*-linux* *-*-gnu*
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#ld: --gc-sections -shared -version-script pr13195.t
#readelf: -s --wide -D
#target: *-*-linux* *-*-gnu*
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#ld: --gc-sections -shared
#readelf: -S --wide --dyn-syms
#target: *-*-linux* *-*-gnu*
-#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#ld: -shared -z max-page-size=0x200000
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* *-*-nacl*
-#notarget: arc-*-* hppa-*-*
+#notarget: arc*-*-* hppa-*-*
# arc target has an extra 64K stack section.
# hppa fails due to PR 12376.
# Targets using the generic linker backend don't sort section symbols
# before local symbols, so don't bother testing them.
-if { [istarget "arc-*-*"]
+if { [istarget "arc*-*-*"]
|| [istarget "d30v-*-*"]
|| [istarget "dlx-*-*"]
|| [istarget "i960-*-*"]
if {![info exists gc_sections_available_saved]} {
# Some targets don't support gc-sections despite whatever's
# advertised by ld's options.
- if { [istarget arc-*-*]
+ if { [istarget arc*-*-*]
|| [istarget d30v-*-*]
|| [istarget dlx-*-*]
|| [istarget i960-*-*]
proc check_shared_lib_support { } {
if {![istarget aarch64*-*-elf]
- && ![istarget arc-*-*]
+ && ![istarget arc*-*-*]
&& ![istarget arm*-*-elf]
&& ![istarget avr-*-*]
&& ![istarget cr16-*-*]