From Cary Coutant: Fix a case in which code takes the address of a

function and also calls it directly.
This commit is contained in:
Ian Lance Taylor
2008-02-01 00:39:10 +00:00
parent 59a016f09f
commit 03e8f2b225
8 changed files with 147 additions and 54 deletions

View File

@ -1028,7 +1028,7 @@ Target_x86_64::Scan::global(const General_options& options,
// taking the address of a function. In that case we need to
// set the entry in the dynamic symbol table to the address of
// the PLT entry.
if (gsym->is_from_dynobj())
if (gsym->is_from_dynobj() && !parameters->output_is_shared())
gsym->set_needs_dynsym_value();
}
// Make a dynamic relocation if necessary.