The elf loader code in or1ksim was not loading init_array and fine_array sections. This is because it was only loading progbit sections. This series updates the elf loader code to load segments by program header to fix this. We still fall back to section loading if there are no program headers, which may happen in really old/odd binaries.
As per investigation from this gist https://gist.github.com/stffrdhrn/acda47a6628e3971e84f7a4fe80f006f
The elf loader code in or1ksim was not loading init_array and fine_array sections. This is because it was only loading progbit sections. This series updates the elf loader code to load segments by program header to fix this. We still fall back to section loading if there are no program headers, which may happen in really old/odd binaries.