This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: elfxx-ia64.c question
- From: Jim Wilson <wilson at redhat dot com>
- To: davidm at hpl dot hp dot com
- Cc: binutils at sources dot redhat dot com, davidm at napali dot hpl dot hp dot com
- Date: 23 Jan 2003 23:47:05 -0500
- Subject: Re: elfxx-ia64.c question
- References: <200301240129.h0O1Tp44028223@napali.hpl.hp.com>
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