[PATCH] packing sections into elf segments
Richard Earnshaw
rearnsha@arm.com
Fri Oct 26 10:45:00 GMT 2001
I'd like to submit the following patch for consideration, it fixes a
problem I reported earlier today when the bfd backend would perform seeks
to negative file offsets when a segment contains sections that are linked
for different virtual addresses, but are to be loaded at one physical
address.
It makes more sense to me that when we are trying to adjust for the
alignment padding between sections by adjusting file positions, that we
should be using the LMAs not the VMAs, after all, the code later in the
same loop uses LMAs for adjusting the file size.
The patch should have no effect on the behaviour of the normal case, where
the VMA and LMA are identical.
R.
<date> Richard Earnshaw (rearnsha@arm.com)
* elf.c (assign_file_positions_for_segments): Use the LMA when
adjusting for inter-section alignment padding.
More information about the Binutils
mailing list