Re: [patch] ELF loader
Dave Brolley <[email protected]>
| Newsgroups | gmane.comp.emulators.sid.devel |
|---|---|
| Message-ID | <[email protected]> |
Ben Elliston wrote: >Dave Brolley <[email protected]> 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