daily update
[external/binutils.git] / gold / testsuite / Makefile.am
index eaf5446..e77a3ed 100644 (file)
@@ -193,6 +193,33 @@ icf_safe_so_test_1.stdout: icf_safe_so_test
 icf_safe_so_test_2.stdout: icf_safe_so_test
        $(TEST_READELF) -h icf_safe_so_test > icf_safe_so_test_2.stdout
 
+check_PROGRAMS += icf_virtual_function_folding_test
+MOSTLYCLEANFILES += icf_virtual_function_folding_test
+icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc
+       $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
+icf_virtual_function_folding_test: icf_virtual_function_folding_test.o gcctestdir/ld
+       $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_virtual_function_folding_test.o -pie
+
+check_SCRIPTS += icf_preemptible_functions_test.sh
+check_DATA += icf_preemptible_functions_test.stdout
+MOSTLYCLEANFILES += icf_preemptible_functions_test
+icf_preemptible_functions_test.o: icf_preemptible_functions_test.cc
+       $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+icf_preemptible_functions_test: icf_preemptible_functions_test.o gcctestdir/ld
+       $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_preemptible_functions_test.o -fPIC -shared
+icf_preemptible_functions_test.stdout: icf_preemptible_functions_test
+       $(TEST_NM) icf_preemptible_functions_test > icf_preemptible_functions_test.stdout
+
+check_SCRIPTS += icf_string_merge_test.sh
+check_DATA += icf_string_merge_test.stdout
+MOSTLYCLEANFILES += icf_string_merge_test
+icf_string_merge_test.o: icf_string_merge_test.cc
+       $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+icf_string_merge_test: icf_string_merge_test.o gcctestdir/ld
+       $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_string_merge_test.o
+icf_string_merge_test.stdout: icf_string_merge_test
+       $(TEST_NM) icf_string_merge_test > icf_string_merge_test.stdout
+
 check_PROGRAMS += basic_test
 check_PROGRAMS += basic_static_test
 check_PROGRAMS += basic_pic_test
@@ -1086,6 +1113,12 @@ script_test_3: basic_test.o gcctestdir/ld script_test_3.t
 script_test_3.stdout: script_test_3
        $(TEST_READELF) -SlW script_test_3 > script_test_3.stdout
 
+check_PROGRAMS += tls_phdrs_script_test
+tls_phdrs_script_test_SOURCES = $(tls_test_SOURCES)
+tls_phdrs_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_3.t
+tls_phdrs_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_3.t
+tls_phdrs_script_test_LDADD = $(tls_test_LDADD)
+
 check_SCRIPTS += script_test_4.sh
 check_DATA += script_test_4.stdout
 MOSTLYCLEANFILES += script_test_4
@@ -1094,6 +1127,12 @@ script_test_4: basic_test.o gcctestdir/ld $(srcdir)/script_test_4.t
 script_test_4.stdout: script_test_4
        $(TEST_READELF) -SlW script_test_4 > script_test_4.stdout
 
+check_PROGRAMS += tls_script_test
+tls_script_test_SOURCES = $(tls_test_SOURCES)
+tls_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_4.t
+tls_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_4.t
+tls_script_test_LDADD = $(tls_test_LDADD)
+
 check_SCRIPTS += script_test_5.sh
 check_DATA += script_test_5.stdout
 MOSTLYCLEANFILES += script_test_5
@@ -1225,6 +1264,15 @@ check_PROGRAMS += plugin_test_5
 plugin_test_5: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms unused.syms gcctestdir/ld plugin_test.so
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z4f13iv",--gc-sections two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms unused.syms
 
+check_PROGRAMS += plugin_test_6
+check_SCRIPTS += plugin_test_6.sh
+check_DATA += plugin_test_6.err
+MOSTLYCLEANFILES += plugin_test_6.err
+plugin_test_6: plugin_common_test_1.syms plugin_common_test_2.syms gcctestdir/ld plugin_test.so
+       $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so" plugin_common_test_1.syms plugin_common_test_2.syms 2>plugin_test_6.err
+plugin_test_6.err: plugin_test_6
+       @touch plugin_test_6.err
+
 plugin_test.so: plugin_test.o
        $(LINK) -Bgcctestdir/ -shared plugin_test.o
 plugin_test.o: plugin_test.c
@@ -1238,6 +1286,10 @@ two_file_test_1b.syms: two_file_test_1b.o
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
 two_file_test_2.syms: two_file_test_2.o
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
+plugin_common_test_1.syms: plugin_common_test_1.o
+       $(TEST_READELF) -sW $< >$@ 2>/dev/null
+plugin_common_test_2.syms: plugin_common_test_2.o
+       $(TEST_READELF) -sW $< >$@ 2>/dev/null
 
 empty.syms:
        @echo "" >$@
@@ -1285,8 +1337,14 @@ local_labels_test: local_labels_test.o
 
 check_PROGRAMS += discard_locals_test
 check_SCRIPTS += discard_locals_test.sh
-check_DATA += discard_locals_test.syms
-MOSTLYCLEANFILES += discard_locals_test.syms
+check_DATA += discard_locals_test.syms \
+       discard_locals_relocatable_test1.syms \
+       discard_locals_relocatable_test2.syms
+MOSTLYCLEANFILES += discard_locals_test.syms \
+       discard_locals_relocatable_test1.syms \
+       discard_locals_relocatable_test2.syms \
+       discard_locals_relocatable_test1.out \
+       discard_locals_relocatable_test2.out
 discard_locals_test_SOURCES = discard_locals_test.c
 discard_locals_test_LDFLAGS = -Bgcctestdir/ -Wl,--discard-locals
 discard_locals_test.syms: discard_locals_test
@@ -1295,6 +1353,18 @@ discard_locals_test.syms: discard_locals_test
 discard_locals_test.o: discard_locals_test.c
        $(COMPILE) -c -Wa,-L -o $@ $<
 
+discard_locals_relocatable_test1.syms: discard_locals_relocatable_test1.out
+       $(TEST_READELF) -sW $< >$@ 2>/dev/null
+discard_locals_relocatable_test.o: discard_locals_relocatable_test.c
+       $(COMPILE) -c -Wa,-L -fPIC -o $@ $<
+discard_locals_relocatable_test1.out: discard_locals_relocatable_test.o ../ld-new
+       ../ld-new --discard-locals -relocatable -o $@ $<
+
+discard_locals_relocatable_test2.syms: discard_locals_relocatable_test2.out
+       $(TEST_READELF) -sW $< >$@ 2>/dev/null
+discard_locals_relocatable_test2.out: discard_locals_relocatable_test.o ../ld-new
+       ../ld-new --discard-all -relocatable -o $@ $<
+
 if MCMODEL_MEDIUM
 check_PROGRAMS += large
 large_SOURCES = large.c
@@ -1456,11 +1526,11 @@ check_SCRIPTS += arm_abs_global.sh
 check_DATA += arm_abs_global.stdout
 arm_abs_lib.o: arm_abs_lib.s
        $(TEST_AS) -march=armv7-a -o $@ $<
-libarm_abs.so: arm_abs_lib.o
+libarm_abs.so: arm_abs_lib.o ../ld-new
        ../ld-new -shared -o $@ arm_abs_lib.o
 arm_abs_global.o: arm_abs_global.s
        $(TEST_AS) -march=armv7-a -o $@ $<
-arm_abs_global: arm_abs_global.o libarm_abs.so
+arm_abs_global: arm_abs_global.o libarm_abs.so ../ld-new
        ../ld-new -o $@ arm_abs_global.o -L. -larm_abs
 arm_abs_global.stdout: arm_abs_global
        $(TEST_READELF) -r $< > $@
@@ -1470,12 +1540,14 @@ MOSTLYCLEANFILES += arm_abs_global
 check_SCRIPTS += arm_branch_in_range.sh
 check_DATA += arm_bl_in_range.stdout arm_bl_out_of_range.stdout \
        thumb_bl_in_range.stdout thumb_bl_out_of_range.stdout \
-       thumb2_bl_in_range.stdout thumb2_bl_out_of_range.stdout
+       thumb2_bl_in_range.stdout thumb2_bl_out_of_range.stdout \
+       thumb_blx_in_range.stdout thumb_blx_out_of_range.stdout \
+       thumb2_blx_in_range.stdout thumb2_blx_out_of_range.stdout
 
 arm_bl_in_range.stdout: arm_bl_in_range
        $(TEST_OBJDUMP) -D $< > $@
 
-arm_bl_in_range: arm_bl_in_range.o
+arm_bl_in_range: arm_bl_in_range.o ../ld-new
        ../ld-new -T $(srcdir)/arm_branch_range.t -o $@ $<
 
 arm_bl_in_range.o: arm_bl_in_range.s
@@ -1484,7 +1556,7 @@ arm_bl_in_range.o: arm_bl_in_range.s
 arm_bl_out_of_range.stdout: arm_bl_out_of_range
        $(TEST_OBJDUMP) -S $< > $@
 
-arm_bl_out_of_range: arm_bl_out_of_range.o
+arm_bl_out_of_range: arm_bl_out_of_range.o ../ld-new
        ../ld-new -T $(srcdir)/arm_branch_range.t -o $@ $<
 
 arm_bl_out_of_range.o: arm_bl_out_of_range.s
@@ -1493,7 +1565,7 @@ arm_bl_out_of_range.o: arm_bl_out_of_range.s
 thumb_bl_in_range.stdout: thumb_bl_in_range
        $(TEST_OBJDUMP) -D $< > $@
 
-thumb_bl_in_range: thumb_bl_in_range.o
+thumb_bl_in_range: thumb_bl_in_range.o ../ld-new
        ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $<
 
 thumb_bl_in_range.o: thumb_bl_in_range.s
@@ -1502,16 +1574,16 @@ thumb_bl_in_range.o: thumb_bl_in_range.s
 thumb_bl_out_of_range.stdout: thumb_bl_out_of_range
        $(TEST_OBJDUMP) -D $< > $@
 
-thumb_bl_out_of_range: thumb_bl_in_range.o
+thumb_bl_out_of_range: thumb_bl_out_of_range.o ../ld-new
        ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $<
 
-thumb_bl_out_of_range.o: thumb_bl_in_range.s
+thumb_bl_out_of_range.o: thumb_bl_out_of_range.s
        $(TEST_AS) -o $@ -march=armv5te $<
 
 thumb2_bl_in_range.stdout: thumb2_bl_in_range
        $(TEST_OBJDUMP) -D $< > $@
 
-thumb2_bl_in_range: thumb2_bl_in_range.o
+thumb2_bl_in_range: thumb2_bl_in_range.o ../ld-new
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
 
 thumb2_bl_in_range.o: thumb_bl_in_range.s
@@ -1520,13 +1592,78 @@ thumb2_bl_in_range.o: thumb_bl_in_range.s
 thumb2_bl_out_of_range.stdout: thumb2_bl_out_of_range
        $(TEST_OBJDUMP) -D $< > $@
 
-thumb2_bl_out_of_range: thumb2_bl_in_range.o
+thumb2_bl_out_of_range: thumb2_bl_out_of_range.o ../ld-new
+       ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
+
+thumb2_bl_out_of_range.o: thumb_bl_out_of_range.s
+       $(TEST_AS) -o $@ -march=armv7-a $<
+
+thumb_blx_in_range.stdout: thumb_blx_in_range
+       $(TEST_OBJDUMP) -D $< > $@
+
+thumb_blx_in_range: thumb_blx_in_range.o ../ld-new
+       ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $<
+
+thumb_blx_in_range.o: thumb_blx_in_range.s
+       $(TEST_AS) -o $@ -march=armv5te $<
+
+thumb_blx_out_of_range.stdout: thumb_blx_out_of_range
+       $(TEST_OBJDUMP) -D $< > $@
+
+thumb_blx_out_of_range: thumb_blx_out_of_range.o ../ld-new
+       ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $<
+
+thumb_blx_out_of_range.o: thumb_blx_out_of_range.s
+       $(TEST_AS) -o $@ -march=armv5te $<
+
+thumb2_blx_in_range.stdout: thumb2_blx_in_range
+       $(TEST_OBJDUMP) -D $< > $@
+
+thumb2_blx_in_range: thumb2_blx_in_range.o ../ld-new
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
 
-thumb2_bl_out_of_range.o: thumb_bl_in_range.s
+thumb2_blx_in_range.o: thumb_blx_in_range.s
+       $(TEST_AS) -o $@ -march=armv7-a $<
+
+thumb2_blx_out_of_range.stdout: thumb2_blx_out_of_range
+       $(TEST_OBJDUMP) -D $< > $@
+
+thumb2_blx_out_of_range: thumb2_blx_out_of_range.o ../ld-new
+       ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
+
+thumb2_blx_out_of_range.o: thumb_blx_out_of_range.s
        $(TEST_AS) -o $@ -march=armv7-a $<
 
 MOSTLYCLEANFILES += arm_bl_in_range arm_bl_out_of_range thumb_bl_in_range \
-       thumb_bl_out_of_range thumb2_bl_in_range thumb2_bl_out_of_range
+       thumb_bl_out_of_range thumb2_bl_in_range thumb2_bl_out_of_range \
+       thumb_blx_in_range thumb_blx_out_of_range thumb2_blx_in_range \
+       thumb2_blx_out_of_range
+
+check_SCRIPTS += arm_fix_v4bx.sh
+check_DATA += arm_fix_v4bx.stdout arm_fix_v4bx_interworking.stdout \
+       arm_no_fix_v4bx.stdout
+
+arm_fix_v4bx.stdout: arm_fix_v4bx
+       $(TEST_OBJDUMP) -D -j.text $< > $@
+
+arm_fix_v4bx: arm_fix_v4bx.o ../ld-new
+       ../ld-new --fix-v4bx -o $@ $<
+
+arm_fix_v4bx.o: arm_fix_v4bx.s
+       $(TEST_AS) -o $@ $<
+
+arm_fix_v4bx_interworking.stdout: arm_fix_v4bx_interworking
+       $(TEST_OBJDUMP) -D -j.text $< > $@
+
+arm_fix_v4bx_interworking: arm_fix_v4bx.o ../ld-new
+       ../ld-new --fix-v4bx-interworking -o $@ $<
+
+arm_no_fix_v4bx.stdout: arm_no_fix_v4bx
+       $(TEST_OBJDUMP) -D -j.text $< > $@
+
+arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new
+       ../ld-new -o $@ $<
+
+MOSTLYCLEANFILES += arm_fix_v4bx arm_fix_v4bx_interworking arm_no_fix_v4bx
 
 endif DEFAULT_TARGET_ARM