This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Allow copy relocations with pie links


>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]