buserror-uk/simavr — pull request #18 by bsekisser (2013-06-06 18:26:21+00:00)
Title: Elf symbols bugfix

Discovered symbols writing outside of array as written.

Original code used address as index into array... some instances shown writes outside bounds of array.

For the fix, I used an estimate symbol count and indexed into the array... same information is still available however logic is changed. do not have any test cases to prove everything is in good working order however code logic provided compiles cleanly and seems sound.

As provided, I can think of some improvements... iirc I used an static inline function which probably should resided in a source file somewheres... either sim_core.c or sim_elf.c If you agree or have any further suggestions let me know.

Michael.