[PATCH]: Fix reloc size assumption in elf_link_sort_relocs()
Nick Clifton
nickc@redhat.com
Fri May 4 14:16:00 GMT 2007
Hi Guys,
I am applying the attached patch which fixes a problem in
elf_link_sort_relocs(). It was assuming that if a .rela.dyn section
is present that only rela relocs were present in the indirect
sections. This might not be true however, if there is also a
.rel.dyn section, and the assumption could lead to a segmentation
fault walking over the end of the sort array. (This was the cause
of the seg-fault reported when linking the zdoom executables).
Cheers
Nick
bfd/ChangeLog
2007-05-04 Nick Clifton <nickc@redhat.com>
* elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
sections are present examine the indirect sections in an attempt
to compute the correct relocation size. If there is any
ambiguity, produce an error and refuse to sort.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elflink.c.patch
Type: text/x-patch
Size: 8899 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20070504/6a00b57d/attachment.bin>
More information about the Binutils
mailing list