diff options
author | Cary Coutant <ccoutant@google.com> | 2011-07-06 22:07:59 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2011-07-06 22:07:59 +0000 |
commit | e24719f6e73a89da8877536830ff047ffc4e2377 (patch) | |
tree | 64b2dfcf4bd113c3a9ace86bba993fa72b8b14de /gold/testsuite | |
parent | 3b2a0cf216646598c8d76c098f1734c9bb5604c7 (diff) | |
download | gdb-e24719f6e73a89da8877536830ff047ffc4e2377.zip gdb-e24719f6e73a89da8877536830ff047ffc4e2377.tar.gz gdb-e24719f6e73a89da8877536830ff047ffc4e2377.tar.bz2 |
* incremental.cc (Sized_incremental_binary::setup_readers): Pass
input file index to Script_info ctor.
(Sized_incremental_binary::do_file_has_changed): Find the
command-line argument for files named in scripts.
* incremental.h (Script_info::Script_info): New ctor
with input file index.
(Script_info::input_file_index): New function.
(Script_info::input_file_index_): New data member.
(Incremental_binary::get_library): Add const.
(Incremental_binary::get_script_info): Add const.
* readsyms.cc (Read_member::is_runnable): Check for this_blocker_.
* testsuite/Makefile.am (incremental_test_5): New test case.
(incremental_test_6): New test case.
* testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/Makefile.am | 26 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 82 |
2 files changed, 99 insertions, 9 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 33ae7c8..67a63f0 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -1929,6 +1929,32 @@ incremental_test_4: two_file_test_1.o two_file_test_1b.o two_file_test_2_v1.o \ cp -f two_file_test_2.o two_file_test_tmp_4.o $(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o +check_PROGRAMS += incremental_test_5 +MOSTLYCLEANFILES += two_file_test_5.a +incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \ + two_file_test_2.o two_file_test_main.o gcctestdir/ld + cp -f two_file_test_1b_v1.o two_file_test_tmp_5.o + $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o + $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_main.o two_file_test_5.a + @sleep 1 + cp -f two_file_test_1b.o two_file_test_tmp_5.o + $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o + $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o two_file_test_5.a + +# Test the --incremental-unchanged flag with an archive library. +# The second link should not update the library. +check_PROGRAMS += incremental_test_6 +MOSTLYCLEANFILES += two_file_test_6.a +incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \ + two_file_test_2.o two_file_test_main.o gcctestdir/ld + cp -f two_file_test_1b.o two_file_test_tmp_6.o + $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o + $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_main.o two_file_test_6.a + @sleep 1 + cp -f two_file_test_1b_v1.o two_file_test_tmp_6.o + $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o + $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown + check_PROGRAMS += incremental_copy_test incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so cp -f copy_test_v1.o copy_test_tmp.o diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index a25b012..0f26182 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -452,15 +452,22 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ # End-to-end incremental linking tests. # Incremental linking is currently supported only on the x86_64 target. + +# Test the --incremental-unchanged flag with an archive library. +# The second link should not update the library. @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_54 = incremental_test_2 \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3 \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4 \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5 \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6 \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_55 = two_file_test_tmp_2.o \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_3.o \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4.base \ -@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_4.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_4.o \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_5.a \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_6.a # These tests work with native and cross linkers. @@ -723,6 +730,8 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS) @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_38 = incremental_test_2$(EXEEXT) \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3$(EXEEXT) \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4$(EXEEXT) \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5$(EXEEXT) \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6$(EXEEXT) \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test$(EXEEXT) \ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1$(EXEEXT) basic_pic_test_SOURCES = basic_pic_test.c @@ -1078,6 +1087,18 @@ incremental_test_4_LDADD = $(LDADD) incremental_test_4_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +incremental_test_5_SOURCES = incremental_test_5.c +incremental_test_5_OBJECTS = incremental_test_5.$(OBJEXT) +incremental_test_5_LDADD = $(LDADD) +incremental_test_5_DEPENDENCIES = libgoldtest.a ../libgold.a \ + ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +incremental_test_6_SOURCES = incremental_test_6.c +incremental_test_6_OBJECTS = incremental_test_6.$(OBJEXT) +incremental_test_6_LDADD = $(LDADD) +incremental_test_6_DEPENDENCIES = libgoldtest.a ../libgold.a \ + ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri1_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri1.$(OBJEXT) initpri1_OBJECTS = $(am_initpri1_OBJECTS) @@ -1578,14 +1599,15 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \ ifuncmain7picstatic.c ifuncmain7pie.c \ $(ifuncmain7static_SOURCES) incremental_common_test_1.c \ incremental_copy_test.c incremental_test_2.c \ - incremental_test_3.c incremental_test_4.c $(initpri1_SOURCES) \ - $(initpri2_SOURCES) $(initpri3a_SOURCES) $(initpri3b_SOURCES) \ - $(justsyms_SOURCES) $(large_SOURCES) local_labels_test.c \ - many_sections_r_test.c $(many_sections_test_SOURCES) \ - $(object_unittest_SOURCES) permission_test.c plugin_test_1.c \ - plugin_test_2.c plugin_test_3.c plugin_test_4.c \ - plugin_test_5.c plugin_test_6.c plugin_test_7.c \ - plugin_test_8.c $(protected_1_SOURCES) $(protected_2_SOURCES) \ + incremental_test_3.c incremental_test_4.c incremental_test_5.c \ + incremental_test_6.c $(initpri1_SOURCES) $(initpri2_SOURCES) \ + $(initpri3a_SOURCES) $(initpri3b_SOURCES) $(justsyms_SOURCES) \ + $(large_SOURCES) local_labels_test.c many_sections_r_test.c \ + $(many_sections_test_SOURCES) $(object_unittest_SOURCES) \ + permission_test.c plugin_test_1.c plugin_test_2.c \ + plugin_test_3.c plugin_test_4.c plugin_test_5.c \ + plugin_test_6.c plugin_test_7.c plugin_test_8.c \ + $(protected_1_SOURCES) $(protected_2_SOURCES) \ $(relro_script_test_SOURCES) $(relro_strip_test_SOURCES) \ $(relro_test_SOURCES) $(script_test_1_SOURCES) \ $(script_test_2_SOURCES) script_test_3.c \ @@ -2734,6 +2756,24 @@ ifuncmain7static$(EXEEXT): $(ifuncmain7static_OBJECTS) $(ifuncmain7static_DEPEND @NATIVE_LINKER_FALSE@incremental_test_4$(EXEEXT): $(incremental_test_4_OBJECTS) $(incremental_test_4_DEPENDENCIES) @NATIVE_LINKER_FALSE@ @rm -f incremental_test_4$(EXEEXT) @NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_4_OBJECTS) $(incremental_test_4_LDADD) $(LIBS) +@DEFAULT_TARGET_X86_64_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES) +@DEFAULT_TARGET_X86_64_FALSE@ @rm -f incremental_test_5$(EXEEXT) +@DEFAULT_TARGET_X86_64_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS) +@GCC_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES) +@GCC_FALSE@ @rm -f incremental_test_5$(EXEEXT) +@GCC_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS) +@NATIVE_LINKER_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES) +@NATIVE_LINKER_FALSE@ @rm -f incremental_test_5$(EXEEXT) +@NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS) +@DEFAULT_TARGET_X86_64_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES) +@DEFAULT_TARGET_X86_64_FALSE@ @rm -f incremental_test_6$(EXEEXT) +@DEFAULT_TARGET_X86_64_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS) +@GCC_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES) +@GCC_FALSE@ @rm -f incremental_test_6$(EXEEXT) +@GCC_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS) +@NATIVE_LINKER_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES) +@NATIVE_LINKER_FALSE@ @rm -f incremental_test_6$(EXEEXT) +@NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS) initpri1$(EXEEXT): $(initpri1_OBJECTS) $(initpri1_DEPENDENCIES) @rm -f initpri1$(EXEEXT) $(initpri1_LINK) $(initpri1_OBJECTS) $(initpri1_LDADD) $(LIBS) @@ -3118,6 +3158,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_5.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_6.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri3.Po@am__quote@ @@ -3808,6 +3850,10 @@ incremental_test_3.log: incremental_test_3$(EXEEXT) @p='incremental_test_3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) incremental_test_4.log: incremental_test_4$(EXEEXT) @p='incremental_test_4$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +incremental_test_5.log: incremental_test_5$(EXEEXT) + @p='incremental_test_5$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +incremental_test_6.log: incremental_test_6$(EXEEXT) + @p='incremental_test_6$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) incremental_copy_test.log: incremental_copy_test$(EXEEXT) @p='incremental_copy_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) incremental_common_test_1.log: incremental_common_test_1$(EXEEXT) @@ -4802,6 +4848,24 @@ uninstall-am: @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_2.o two_file_test_tmp_4.o @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b_v1.o two_file_test_tmp_5.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_main.o two_file_test_5.a +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1 +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b.o two_file_test_tmp_5.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o two_file_test_5.a +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b.o two_file_test_tmp_6.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_main.o two_file_test_6.a +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1 +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b_v1.o two_file_test_tmp_6.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f copy_test_v1.o copy_test_tmp.o @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so |