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 the assignment of LMA for subsequent sections which do not have their own explicit address set.


This patch handles the case when a section without an explicitly set
VMA follows a section which has different LMA and VMA. In this case,
the subsequent section is expected to have the same difference
between its VMA and LMA as the previous section has. See

Best regards,
Igor Kudrin


	(Output_segment::set_section_addresses): Handle the physical
	address (paddr) separately from the virtual address (addr).
	Adjust call to Output_segment::set_section_list_addresses.
	(Output_segment::set_section_list_addresses): Add paddr
	argument. Use the load address and the current physical
	address to calculate offsets of sections.
	* output.h (Output_segment::set_section_list_addresses):
	Add paddr argument.
	Calculate load_address using the change of the dot_value.
	(Output_section_definition::set_section_addresses): Handle
	the case when neighter a VMA nor an LMA region is set for
	the section.
	* testsuite/ (pr20280): New test.
	* testsuite/ Regenerate
	* testsuite/pr20280.s: New test source file.
	* testsuite/ New test script.
	* testsuite/pr20280.t: New test linker script.

Attachment: gold-pr20280-LMA.patch.txt
Description: gold-pr20280-LMA.patch.txt

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