This is the mail archive of the binutils@sources.redhat.com 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: elfxx-ia64.c question


The change was made before the file was submitted to the FSF, so there will
be no useful info in the FSF CVS repository.  I checked the Red Hat internal
tree, and found that Richard Henderson made the change July 15, 1999.  The
ChangeLog entry is

Thu Jul 15 23:26:45 1999  Richard Henderson  <rth@cygnus.com>

        * elf64-ia64.c (elf64_ia64_reloc_type_lookup): Add GPREL64I.
        (get_dyn_name): Tidy anonymous names.
        (elf64_ia64_check_relocs): Don't allocate dynamic relocations
        for sections that aren't loaded.
        (elf64_ia64_dynamic_symbol_p): Dereference indirect symbols.
        (allocate_fptr): Likewise.
        (allocate_plt_entries): Likewise.  Don't rely on NEEDS_PLT.
        (allocate_plt2_entries): Likewise.
        (elf64_ia64_size_dynamic_sections): Thinko dropping .rela.
        (set_got_entry): Take dynindx, not h.  Thinko in gp-rel calc.
        (elf64_ia64_final_link): Simplify initial gp_val.
        (elf64_ia64_relocate_section): Track unversioned h for use with
        get_dyn_name.  Don't install dynamic relocations on sections
        that aren't loaded.  Copy correct FPTR setup for LTOFF_FPTR.
        Don't rely on h->plt.offset.
        (elf64_ia64_finish_dynamic_symbol): Don't rely on NEEDS_PLT.

It appears this change was necessary to make the dynamic linking support work,
but I don't know why.  This is one of the earliest patches to add dynamic
linking support to the IA-64 toolchain.

We could always try changing the code and checking to see what breaks.
I'm guessing a glibc build will trigger a problem.

By the way, the SEGREL relocs work the same way.

Do you have an example that shows a problem with the current behaviour?
I don't see how you can get negative values unless something funny is going
on, and if something funny is going on, then ignoring the relocation seems
like a reasonable thing to do.

Jim


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