[patch] ELF loader

Dave Brolley brolley@redhat.com
Fri Feb 13 15:17:00 GMT 2004


Ben Elliston wrote:

>Dave Brolley <brolley@redhat.com> writes:
>
>  
>
>>I'm committing the attached patch which requirks the ELF loader to
>>correct the following problems:
>>    
>>
>
>This looks mostly fine, however I have one question: where is the
>dependency on libiberty introduced and can it be avoided?
>  
>
I used xrealloc to allocate loadAreas and textSections. It used to be an 
unchecked hard coded limit of 100 elements each. I figured that using 
libiberty was ok since it's already used by sid/component/cgen-cpu. 
That's where I got the Makefile.am changes.

It could be avoided by using realloc and checking for failure. I guess 
failure would have to result in an abort?

Dave




More information about the Sid mailing list