backport recent gold portability fixes to 2.23

Roland McGrath
Fri Nov 2 19:22:00 GMT 2012

Attached is a series of five patches for the 2.23 branch.
Collectively they have the following gold/ChangeLog fragment.

This is straightforward backporting of those five changes I committed to
trunk yesterday.  Two of them required manual intervention, the others just
applied directly.  The gold.h change matches what's the system.h change on
trunk.  The relocate_for_relocatable change matches what's the
relocate_relocs change on trunk.

Ok for 2.23 branch?


2012-11-01  Roland McGrath  <>

	* target.h (Sized_target::relocate_for_relocatable): Use Elf_Off
	for offset_in_output_section parameter.
	(Sized_target::relocate_special_relocatable): Likewise.
	* (Target_arm::relocate_for_relocatable): Likewise.
	(Target_arm::relocate_special_relocatable): Likewise.
	* (Target_i386::relocate_for_relocatable): Likewise.
	* (Target_powerpc::relocate_for_relocatable): Likewise.
	* (Target_sparc::relocate_for_relocatable): Likewise.
	* target-reloc.h (relocate_for_relocatable): Likewise.
	* testsuite/ (Target_test): Likewise.
	* (Target_tilegx::relocate_for_relocatable): Likewise.
	* (Target_x86_64::relocate_for_relocatable): Likewise.

	* gold.h: Move inclusion of <clocale> to after <libintl.h> in
	[ENABLE_NLS] section, and separately at top of [!ENABLE_NLS] section.

	* (set_close_on_exec): Add ATTRIBUTE_UNUSED to the
	parameter, which is unused in the [!F_SETFD] case.

	* (Sized_elf_reloc_mapper::symbol_section): Cast
	SYMNDX to off_t before comparing it to this->data_size().
	* (Output_symtab_xindex::endian_do_write): Likewise.
	* (Output_section_incremental_inputs::do_write):
	Cast GLOBAL_SYM_COUNT to off_t before comparing it to SYMTAB_SIZE.

	* Include "libiberty.h" for vasprintf declaration.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold-backport
Type: application/octet-stream
Size: 23572 bytes
Desc: not available
URL: <>

More information about the Binutils mailing list