diff options
author | Ian Lance Taylor <iant@google.com> | 2006-11-07 18:51:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-11-07 18:51:39 +0000 |
commit | 645f81233bd13bc6102580bac4b886c6056028e3 (patch) | |
tree | e104ddfc8f2a1f52326b8a2fa9c3b5c50ae43fa0 /gold/symtab.cc | |
parent | 9e59254c41b56b91b7640ed5b727430cc537daac (diff) | |
download | gdb-645f81233bd13bc6102580bac4b886c6056028e3.zip gdb-645f81233bd13bc6102580bac4b886c6056028e3.tar.gz gdb-645f81233bd13bc6102580bac4b886c6056028e3.tar.bz2 |
Add Elf_file interface which can be used by both Sized_relobj and
Sized_dynobj.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 12 |
1 files changed, 8 insertions, 4 deletions
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<const char*>(c), len); + { + Task_locker_obj<Object> 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<const char*>(c), len); + } } } } |