This is the mail archive of the binutils@sourceware.org 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 the value of "dot" symbol in an empty section.


Hi,

gold may assign an invalid value to symbol "dot" in a rare case when
the section, where the assignment is located, is empty, and, at the
same time, some orphan sections are put just before it. In that case,
you will get different values if you take the value of "dot" symbol
inside the section or if you take ADDR of it.

Best regards,
Igor Kudrin

---
gold/ChangeLog

	* script-sections.cc
	(Output_section_definition::finalize_symbols): Use
	this->evaluated_address_ to initialize variable "address".
	* testsuite/Makefile.am (script_test_18): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/script_test_18.s: New test source file.
	* testsuite/script_test_18.sh: New test script.
	* testsuite/script_test_18.t: New test linker script.

Attachment: gold-dot-in-empty-after-orphan.patch.txt
Description: gold-dot-in-empty-after-orphan.patch.txt


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