aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/Makefile.am36
-rw-r--r--gold/testsuite/Makefile.in42
-rwxr-xr-xgold/testsuite/arm_attr_merge.sh44
-rw-r--r--gold/testsuite/arm_attr_merge_6a.s4
-rw-r--r--gold/testsuite/arm_attr_merge_6b.s3
-rw-r--r--gold/testsuite/arm_attr_merge_7a.s4
-rw-r--r--gold/testsuite/arm_attr_merge_7b.s4
7 files changed, 134 insertions, 3 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index e77a3ed..435eeab 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1666,4 +1666,40 @@ arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new
MOSTLYCLEANFILES += arm_fix_v4bx arm_fix_v4bx_interworking arm_no_fix_v4bx
+check_SCRIPTS += arm_attr_merge.sh
+check_DATA += arm_attr_merge_6.stdout arm_attr_merge_6r.stdout \
+ arm_attr_merge_7.stdout
+
+arm_attr_merge_6.stdout: arm_attr_merge_6
+ $(TEST_READELF) -A $< > $@
+
+arm_attr_merge_6: arm_attr_merge_6a.o arm_attr_merge_6b.o
+ ../ld-new -o $@ arm_attr_merge_6a.o arm_attr_merge_6b.o
+
+arm_attr_merge_6a.o: arm_attr_merge_6a.s
+ $(TEST_AS) -o $@ $<
+
+arm_attr_merge_6b.o: arm_attr_merge_6b.s
+ $(TEST_AS) -o $@ $<
+
+arm_attr_merge_6r.stdout: arm_attr_merge_6r
+ $(TEST_READELF) -A $< > $@
+
+arm_attr_merge_6r: arm_attr_merge_6b.o arm_attr_merge_6a.o
+ ../ld-new -o $@ arm_attr_merge_6b.o arm_attr_merge_6a.o
+
+arm_attr_merge_7.stdout: arm_attr_merge_7
+ $(TEST_READELF) -A $< > $@
+
+arm_attr_merge_7: arm_attr_merge_7a.o arm_attr_merge_7b.o
+ ../ld-new -o $@ arm_attr_merge_7a.o arm_attr_merge_7b.o
+
+arm_attr_merge_7a.o: arm_attr_merge_7a.s
+ $(TEST_AS) -o $@ $<
+
+arm_attr_merge_7b.o: arm_attr_merge_7b.s
+ $(TEST_AS) -o $@ $<
+
+MOSTLYCLEANFILES += arm_attr_merge_6 arm_attr_merge_6r arm_attr_merge_7
+
endif DEFAULT_TARGET_ARM
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 7b51717..968d010 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -344,7 +344,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \
@DEFAULT_TARGET_ARM_TRUE@am__append_38 = arm_abs_global.sh \
@DEFAULT_TARGET_ARM_TRUE@ arm_branch_in_range.sh \
-@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.sh
+@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.sh arm_attr_merge.sh
@DEFAULT_TARGET_ARM_TRUE@am__append_39 = arm_abs_global.stdout \
@DEFAULT_TARGET_ARM_TRUE@ arm_bl_in_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@ arm_bl_out_of_range.stdout \
@@ -358,7 +358,10 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \
@DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_out_of_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.stdout \
@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx_interworking.stdout \
-@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx.stdout
+@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx.stdout \
+@DEFAULT_TARGET_ARM_TRUE@ arm_attr_merge_6.stdout \
+@DEFAULT_TARGET_ARM_TRUE@ arm_attr_merge_6r.stdout \
+@DEFAULT_TARGET_ARM_TRUE@ arm_attr_merge_7.stdout
@DEFAULT_TARGET_ARM_TRUE@am__append_40 = arm_abs_global \
@DEFAULT_TARGET_ARM_TRUE@ arm_bl_in_range arm_bl_out_of_range \
@DEFAULT_TARGET_ARM_TRUE@ thumb_bl_in_range \
@@ -370,7 +373,8 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \
@DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_in_range \
@DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_out_of_range arm_fix_v4bx \
@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx_interworking \
-@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx
+@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx arm_attr_merge_6 \
+@DEFAULT_TARGET_ARM_TRUE@ arm_attr_merge_6r arm_attr_merge_7
subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -1244,7 +1248,9 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
+install_as_default = @install_as_default@
install_sh = @install_sh@
+installed_linker = @installed_linker@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -3284,6 +3290,36 @@ uninstall-am:
@DEFAULT_TARGET_ARM_TRUE@arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new
@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $<
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6.stdout: arm_attr_merge_6
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_READELF) -A $< > $@
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6: arm_attr_merge_6a.o arm_attr_merge_6b.o
+@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ arm_attr_merge_6a.o arm_attr_merge_6b.o
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6a.o: arm_attr_merge_6a.s
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $<
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6b.o: arm_attr_merge_6b.s
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $<
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6r.stdout: arm_attr_merge_6r
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_READELF) -A $< > $@
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_6r: arm_attr_merge_6b.o arm_attr_merge_6a.o
+@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ arm_attr_merge_6b.o arm_attr_merge_6a.o
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_7.stdout: arm_attr_merge_7
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_READELF) -A $< > $@
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_7: arm_attr_merge_7a.o arm_attr_merge_7b.o
+@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ arm_attr_merge_7a.o arm_attr_merge_7b.o
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_7a.o: arm_attr_merge_7a.s
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $<
+
+@DEFAULT_TARGET_ARM_TRUE@arm_attr_merge_7b.o: arm_attr_merge_7b.s
+@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $<
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/gold/testsuite/arm_attr_merge.sh b/gold/testsuite/arm_attr_merge.sh
new file mode 100755
index 0000000..3066f4f
--- /dev/null
+++ b/gold/testsuite/arm_attr_merge.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# arm_attr_merge.sh -- test ARM attributes merging.
+
+# Copyright 2010 Free Software Foundation, Inc.
+# Written by Doug Kwan <dougkwan@google.com>
+
+# This file is part of gold.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# This file goes with the assembler source files arm_attr_merge*.s
+
+check()
+{
+ file=$1
+ pattern=$2
+ found=`grep "$pattern" $file`
+ if test -z "$found"; then
+ echo "pattern \"$pattern\" not found in file $file."
+ exit 1
+ fi
+}
+
+# This is a bit crude.
+
+check arm_attr_merge_6.stdout "Tag_MPextension_use: Allowed"
+check arm_attr_merge_6r.stdout "Tag_MPextension_use: Allowed"
+check arm_attr_merge_7.stdout "Tag_MPextension_use: Allowed"
+
+exit 0
diff --git a/gold/testsuite/arm_attr_merge_6a.s b/gold/testsuite/arm_attr_merge_6a.s
new file mode 100644
index 0000000..df62e53
--- /dev/null
+++ b/gold/testsuite/arm_attr_merge_6a.s
@@ -0,0 +1,4 @@
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute 70, 1
+ .file "arm_attr_merge_6a.s"
diff --git a/gold/testsuite/arm_attr_merge_6b.s b/gold/testsuite/arm_attr_merge_6b.s
new file mode 100644
index 0000000..b06e3e0
--- /dev/null
+++ b/gold/testsuite/arm_attr_merge_6b.s
@@ -0,0 +1,3 @@
+ .cpu cortex-a9
+ .fpu softvfp
+ .file "arm_attr_merge_6b.s"
diff --git a/gold/testsuite/arm_attr_merge_7a.s b/gold/testsuite/arm_attr_merge_7a.s
new file mode 100644
index 0000000..4f55029
--- /dev/null
+++ b/gold/testsuite/arm_attr_merge_7a.s
@@ -0,0 +1,4 @@
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute 70, 1
+ .file "arm_attr_merge_7a.s"
diff --git a/gold/testsuite/arm_attr_merge_7b.s b/gold/testsuite/arm_attr_merge_7b.s
new file mode 100644
index 0000000..69135b5
--- /dev/null
+++ b/gold/testsuite/arm_attr_merge_7b.s
@@ -0,0 +1,4 @@
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute Tag_MPextension_use, 1
+ .file "arm_attr_merge_7b.s"