From 645f81233bd13bc6102580bac4b886c6056028e3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 7 Nov 2006 18:51:39 +0000 Subject: Add Elf_file interface which can be used by both Sized_relobj and Sized_dynobj. --- gold/symtab.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gold/symtab.cc') diff --git a/gold/symtab.cc b/gold/symtab.cc index 054e07f..ac14c01 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -10,6 +10,7 @@ #include "object.h" #include "output.h" #include "target.h" +#include "workqueue.h" #include "symtab.h" namespace gold @@ -1111,10 +1112,13 @@ Warnings::note_warnings(Symbol_table* symtab) // we relocate sections. That means that we can not lock // the object then, as we might try to issue the same // warning multiple times simultaneously. - const unsigned char* c; - off_t len; - c = p->second.object->section_contents(p->second.shndx, &len); - p->second.set_text(reinterpret_cast(c), len); + { + Task_locker_obj tl(*p->second.object); + const unsigned char* c; + off_t len; + c = p->second.object->section_contents(p->second.shndx, &len); + p->second.set_text(reinterpret_cast(c), len); + } } } } -- cgit v1.1