This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Memory corruption handling x86 relocs
- To: fnf at be dot com
- Subject: Re: Memory corruption handling x86 relocs
- From: Nick Clifton <nickc at redhat dot com>
- Date: Sun, 11 Feb 2001 14:30:30 -0800
- CC: binutils at sources dot redhat dot com
Hi Fred,
: I have a test case that triggers internal memory corruption in BFD
: when processing x86 relocs during linking. Basically either BFD is
: incorrectly computing the amount of space needed, or is incorrectly
: trying to store more relocs than it should, overwriting some other
: pointers.
Any luck figuring out exactly what is going wrong ?
: + BFD_ASSERT (sreloc->reloc_count < (sreloc->_raw_size / sizeof (Elf32_External_Rel)));
Why is the test for 'less than' rather than 'less than or equal to' ?
reloc_count is the number of relocs in the section, which if they are
REL type relocs ought to be equal to _raw_size/12, so the above assert
would fail.
Cheers
Nick