Fix versions of copied symbols.

This commit is contained in:
Ian Lance Taylor
2007-10-22 23:08:22 +00:00
parent 60dc88db8b
commit 46fe162319
9 changed files with 187 additions and 49 deletions

View File

@ -649,14 +649,9 @@ Target_i386::copy_reloc(const General_options* options,
off_t offset = dynbss_size;
dynbss->set_space_size(dynbss_size + symsize);
// Define the symbol in the .dynbss section.
symtab->define_in_output_data(this, ssym->name(), ssym->version(),
dynbss, offset, symsize, ssym->type(),
ssym->binding(), ssym->visibility(),
ssym->nonvis(), false, false);
symtab->define_with_copy_reloc(this, ssym, dynbss, offset);
// Add the COPY reloc.
ssym->set_needs_dynsym_entry();
Reloc_section* rel_dyn = this->rel_dyn_section(layout);
rel_dyn->add_global(ssym, elfcpp::R_386_COPY, dynbss, offset);
}