Strip broke for me in 2.15...
Nick Clifton
nickc@redhat.com
Tue May 25 10:47:00 GMT 2004
Hi David,
> The file that fails is about 30MB. So my naive guess is that something
> is overflowing somewhere when stripping large files. I am not sure that
> it would be the most productive use of my time to try to find the
> smallest case that makes it fail.
>
> I would gladly make the offending file available to anyone that wants to
> try to fix the problem.
If you can post a URL for the test code - and assuming that there are no
NDAs that need to be signed before the code can be downloaded, then I
will try to have a look at the problem. No promises though - I tend to
get swamped by other stuff.
> Alternatively I would be happy to try to fix it. But would appreciate
> some pointers about where to look.
Since this was working in 2.14 and is now broken in 2.15 an obvious
place to start would be to run a diff between the two sets of sources
and look for possible changes to the alignment handling code.
In particular functions to look at are:
bfd/elfcode.h:elf_swap_phdr_in [where the alignment is read in]
bfd/elfcode.h:elf_swap_phdr_out [where the alignment is written out]
bfd/elf.c:assign_file_positions_for_segments [where new alignments
are calculated]
I would concentrate on the value of the p_align field in the segment
header and the value of the alignment_power field in the asection
structure. My guess is that somewhere there is a mismatch between the
value stored in p_align (a straight integer alignment value) and the
value stored in alignment_power (log2 of the alignment power).
Cheers
Nick
More information about the Binutils
mailing list