Allow copy relocations with pie links
Cary Coutant
ccoutant@google.com
Thu May 8 23:29:00 GMT 2014
>> I ran the i386 tests. David, Alan, Walt, and Doug, can you help test
>> this patch on your respective targets?
>
> The change isn't appropriate for powerpc. We don't have pc-relative
> addressing modes, so must use the GOT in PIEs.
case elfcpp::R_PPC64_REL64:
case elfcpp::R_POWERPC_REL32:
// Make a dynamic relocation if necessary.
if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type, target)))
{
if (gsym->may_need_copy_reloc())
{
target->copy_reloc(symtab, layout, object,
data_shndx, output_section, gsym,
reloc);
}
What should this code do, then? Add a COPY reloc only for
position-dependent executables?
-cary
More information about the Binutils
mailing list