[PATCH] Fixes for GNU ld on amd64 Solaris

Michael Wetherell mike.wetherell@ntlworld.com
Wed Jun 28 09:17:00 GMT 2006


Hi,

ld has been giving the following error on Solaris x86-64:
/usr/lib/amd64/crti.o: file not recognized: File format not recognized 

I found under a debugger that it's because of an unknown header type 
0x6ffffff6 (SHT_SUNW_signature). Then searching for that, I discovered 
that they've already fixed in OpenSolaris, and that they also added two 
more: SHT_SUNW_dof and SHT_SUNW_syminfo.

The patch below ignores these three headers and also sets LIBPATH_SUFFIX 
and ELF_INTERPRETER_NAME. I've checked that gcc now builds 
--with-gnu-ld both natively and as a cross compiler, and compiled some 
large projects with it.

Regards,
Mike

bfd/ChangeLog
2006-06-28  Michael Wetherell  <mike.wetherell@ntlworld.com>

	* elf.c (bfd_section_from_shdr): ingore Sun section types
	SHT_GNU_syminfo, SHT_GNU_signature and SHT_GNU_dof.

include/elf/ChangeLog
2006-06-28  Michael Wetherell  <mike.wetherell@ntlworld.com>

	* common.h (SHT_SUNW_dof, SHT_SUNW_signature, SHT_SUNW_syminfo): New.
	* common.h (SHT_GNU_dof, SHT_GNU_signature, SHT_GNU_syminfo): Define
	GNU versions of the new SUNW defines.

ld/ChangeLog
2006-06-28  Michael Wetherell  <mike.wetherell@ntlworld.com>

	* configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Correct
	typo setting targ_extra_libpath.
	* emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME):
	Set for *-*-solaris2*.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solaris-amd64.diff
Type: text/x-diff
Size: 3700 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060628/61593b42/attachment.bin>


More information about the Binutils mailing list