summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gold/ChangeLog13
-rw-r--r--gold/gold.cc3
-rw-r--r--gold/layout.cc2
-rw-r--r--gold/layout.h3
-rw-r--r--gold/testsuite/Makefile.am5
-rw-r--r--gold/testsuite/Makefile.in6
6 files changed, 25 insertions, 7 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index e674ed4a74..d5ffae1be7 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,16 @@
+2014-09-23 Taiju Tsuiki <tzik@google.com>
+ Cary Coutant <ccoutant@google.com>
+
+ * gold.cc (queue_final_tasks): Add Write_sections_task as a blocker
+ on input_sections_blocker.
+ * layout.cc (Write_sections_task::locks): Unblock
+ input_sections_blocker_.
+ * layout.h (Write_sections_task::Write_sections_task): Add
+ input_sections_blocker.
+ * testsuite/Makefile.am (exception_x86_64_bnd_test): Add gcctestdir/ld
+ to DEPENDENCIES.
+ * testsuite/Makefile.in: Regenerate.
+
2014-09-18 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
* testsuite/Makefile.am (plugin_test_10): New test.
diff --git a/gold/gold.cc b/gold/gold.cc
index 4833aec762..bdfb33d995 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -808,6 +808,8 @@ queue_final_tasks(const General_options& options,
if (!any_postprocessing_sections)
{
input_sections_blocker = new Task_token(true);
+ // Write_symbols_task, Relocate_tasks.
+ input_sections_blocker->add_blocker();
input_sections_blocker->add_blockers(input_objects->number_of_relobjs());
}
@@ -836,6 +838,7 @@ queue_final_tasks(const General_options& options,
// Queue a task to write out the output sections.
workqueue->queue(new Write_sections_task(layout, of, output_sections_blocker,
+ input_sections_blocker,
final_blocker));
// Queue a task to write out everything else.
diff --git a/gold/layout.cc b/gold/layout.cc
index 82db775685..ef0a879b41 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -5532,6 +5532,8 @@ void
Write_sections_task::locks(Task_locker* tl)
{
tl->add(this, this->output_sections_blocker_);
+ if (this->input_sections_blocker_ != NULL)
+ tl->add(this, this->input_sections_blocker_);
tl->add(this, this->final_blocker_);
}
diff --git a/gold/layout.h b/gold/layout.h
index 7c0113cdf7..032f5f332d 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -1454,9 +1454,11 @@ class Write_sections_task : public Task
public:
Write_sections_task(const Layout* layout, Output_file* of,
Task_token* output_sections_blocker,
+ Task_token* input_sections_blocker,
Task_token* final_blocker)
: layout_(layout), of_(of),
output_sections_blocker_(output_sections_blocker),
+ input_sections_blocker_(input_sections_blocker),
final_blocker_(final_blocker)
{ }
@@ -1481,6 +1483,7 @@ class Write_sections_task : public Task
const Layout* layout_;
Output_file* of_;
Task_token* output_sections_blocker_;
+ Task_token* input_sections_blocker_;
Task_token* final_blocker_;
};
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index dd06d5fd72..35cd01394d 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -2380,10 +2380,9 @@ endif DEFAULT_TARGET_X86_64
if DEFAULT_TARGET_X86_64
check_PROGRAMS += exception_x86_64_bnd_test
exception_x86_64_bnd_test_SOURCES = exception_test_main.cc
-exception_x86_64_bnd_test_DEPENDENCIES = exception_x86_64_bnd_1.o \
- exception_x86_64_bnd_2.o
+exception_x86_64_bnd_test_DEPENDENCIES = gcctestdir/ld exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS)
-exception_x86_64_bnd_test_LDADD = $(exception_x86_64_bnd_test_DEPENDENCIES)
+exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
exception_x86_64_bnd_1.o: exception_test_1.cc gcctestdir/as
$(CXXCOMPILE) -c -fpic -Bgcctestdir/ -Wa,-madd-bnd-prefix -o $@ $<
exception_x86_64_bnd_2.o: exception_test_2.cc gcctestdir/as
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index fed610f19f..8fbb644697 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -2732,11 +2732,9 @@ LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ehdr_start_test_5_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@ehdr_start_test_5_LDADD =
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_SOURCES = exception_test_main.cc
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_DEPENDENCIES = exception_x86_64_bnd_1.o \
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_x86_64_bnd_2.o
-
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_DEPENDENCIES = gcctestdir/ld exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS)
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = $(exception_x86_64_bnd_test_DEPENDENCIES)
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
all: $(BUILT_SOURCES)