PATCH: Minor ELF32/ia64 cleanup

H. J. Lu hjl@lucon.org
Wed May 4 00:34:00 GMT 2005


On Tue, May 03, 2005 at 02:06:41PM -0700, James E Wilson wrote:
> On Tue, 2005-05-03 at 12:21, H. J. Lu wrote:
> > 	* elfxx-ia64.c (ARCH_SIZE): New.
> > 	(LOG_SECTION_ALIGN): Likewise.
> > 	(elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
> > 	align relocation sections.
> > 	(get_fptr): Likewise.
> > 	(get_reloc_section): Likewise.
> > 	(elfNN_ia64_tprel_base): Likewise.
> > 	(elfNN_ia64_check_relocs): Support 32bit relocations.
> > 	(allocate_global_fptr_got): Likewise.
> > 	(allocate_dynrel_entries): Likewise.
> > 	(set_got_entry): Likewise.
> > 	(set_pltoff_entry): Likewise.
> > 	(elfNN_ia64_relocate_section): Likewise.
> 
> Thanks.  This does look like a useful improvement.
> 
> There seems to be a few oddities here, e.g. a FPTR64 relocation
> presented to a 32-bit toolchain will create a FPTR32 dynamic relocation
> for it, and similarly a FPTR32 relocation presented to a 64-bit
> toolchain will create a FPTR64 dynamic relocation for it.  This is a bit
> odd, but I suspect these won't occur in practice.  And this is an

I agree. I never bothered to deal with that. I have been using
it on Linux without any problems.

> improvement over what we had before, since at least we correctly get
> FPTR32 with a 32-bit toolchain which we didn't get before.
> 
> Do you have access to ia64-hpux to double check any of this?  ia64-hpux
> should presumably be considered the ILP32 reference, and GNU ld should
> be behaving the same as the hp linker.  We shouldn't be creating our own
> 32-bit standard, at least not without an extremely good reason.

I tried. Apparently, HPUX ld needs to provide some symbols, like
HPUX/hppa. But I don't know much about HPUX runtime. I believe
with my patch, someone who knows HPUX runtime can make ia64 ld to work
on HPUX.


H.J.



More information about the Binutils mailing list