This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


	* (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/ (arm_target_lazy_init): New test.
	* testsuite/ Regenerate.
	* testsuite/arm_target_lazy_init.s: New test source file.
	* testsuite/ New test script.
	* testsuite/arm_target_lazy_init.t: New test linker script.

Attachment: gold-arm-target-fix-internal-error.patch.txt
Description: gold-arm-target-fix-internal-error.patch.txt

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]