// Report about including a member from an archive.
void
-Mapfile::report_include_archive_member(const Archive* archive,
- const std::string& member_name,
+Mapfile::report_include_archive_member(const std::string& member_name,
const Symbol* sym, const char* why)
{
// We print a header before the list of archive members, mainly for
this->printed_archive_header_ = true;
}
- fprintf(this->map_file_, "%s(%s)", archive->file().filename().c_str(),
- member_name.c_str());
+ fprintf(this->map_file_, "%s", member_name.c_str());
- size_t len = (archive->file().filename().length()
- + member_name.length()
- + 2);
- this->advance_to_column(len, 30);
+ this->advance_to_column(member_name.length(), 30);
if (sym == NULL)
fprintf(this->map_file_, "%s", why);
template<int size, bool big_endian>
void
Mapfile::print_input_section_symbols(
- const Sized_relobj<size, big_endian>* relobj,
+ const Sized_relobj_file<size, big_endian>* relobj,
unsigned int shndx)
{
unsigned int symcount = relobj->symbol_count();
{
os = relobj->output_section(shndx);
addr = relobj->output_section_offset(shndx);
- if (addr != -1U)
+ if (addr != -1ULL)
addr += os->address();
}
#ifdef HAVE_TARGET_32_LITTLE
case Parameters::TARGET_32_LITTLE:
{
- const Sized_relobj<32, false>* sized_relobj =
- static_cast<Sized_relobj<32, false>*>(relobj);
+ const Sized_relobj_file<32, false>* sized_relobj =
+ static_cast<Sized_relobj_file<32, false>*>(relobj);
this->print_input_section_symbols(sized_relobj, shndx);
}
break;
#ifdef HAVE_TARGET_32_BIG
case Parameters::TARGET_32_BIG:
{
- const Sized_relobj<32, true>* sized_relobj =
- static_cast<Sized_relobj<32, true>*>(relobj);
+ const Sized_relobj_file<32, true>* sized_relobj =
+ static_cast<Sized_relobj_file<32, true>*>(relobj);
this->print_input_section_symbols(sized_relobj, shndx);
}
break;
#ifdef HAVE_TARGET_64_LITTLE
case Parameters::TARGET_64_LITTLE:
{
- const Sized_relobj<64, false>* sized_relobj =
- static_cast<Sized_relobj<64, false>*>(relobj);
+ const Sized_relobj_file<64, false>* sized_relobj =
+ static_cast<Sized_relobj_file<64, false>*>(relobj);
this->print_input_section_symbols(sized_relobj, shndx);
}
break;
#ifdef HAVE_TARGET_64_BIG
case Parameters::TARGET_64_BIG:
{
- const Sized_relobj<64, true>* sized_relobj =
- static_cast<Sized_relobj<64, true>*>(relobj);
+ const Sized_relobj_file<64, true>* sized_relobj =
+ static_cast<Sized_relobj_file<64, true>*>(relobj);
this->print_input_section_symbols(sized_relobj, shndx);
}
break;
++p)
{
Relobj* relobj = *p;
+ // Lock the object so we can read from it. This is only called
+ // single-threaded from Layout_task_runner, so it is OK to lock.
+ // Unfortunately we have no way to pass in a Task token.
+ const Task* dummy_task = reinterpret_cast<const Task*>(-1);
+ Task_lock_obj<Object> tl(dummy_task, relobj);
+
unsigned int shnum = relobj->shnum();
for (unsigned int i = 0; i < shnum; ++i)
{