[PATCH][gold] Fix an internal error in the constructor of Target_arm.

Igor Kudrin ikudrin@accesssoftek.com
Fri Dec 16 18:08:00 GMT 2016


Hi,

In some cases, a Target object may be created before all the options
are read, for instance, if the used linker script contains
an OUTPUT_FORMAT statement. Consequently, the initialization for target
relocations cannot be done in the constructor and should be delayed.

Best regards,
Igor Kudrin

---
gold/ChangeLog

	* arm.cc (Arm_scan_relocatable_relocs::local_section_strategy):
	Adjust call to Target_arm::get_reloc_reloc_type.
	(Target_arm::target1_is_set_, Target_arm::target2_is_set_): New
	data members.
	(Target_arm::Target_arm): Initialize new data members, remove
	handling of --target1-rel, -target1-abs and --target2= options.
	(Target_arm::get_reloc_reloc_type): Remove const, Handle
	--target1-rel, --target1-abs and --target2= options.
	* testsuite/Makefile.am (arm_target_lazy_init): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/arm_target_lazy_init.s: New test source file.
	* testsuite/arm_target_lazy_init.sh: New test script.
	* testsuite/arm_target_lazy_init.t: New test linker script.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gold-arm-target-fix-internal-error.patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20161216/48dfdbdb/attachment.txt>


More information about the Binutils mailing list