seL4 / microkit

Microkit - A simple operating system framework for the seL4 microkernel
Other
68 stars 37 forks source link

tool: fixes for ELF parsing errors #149

Closed Ivan-Velickovic closed 4 days ago

Ivan-Velickovic commented 4 days ago

The current code would build up a map of ELF symbols when first parsing the ELF for quick lookup later on when we patch/read certain symbols. In this process if we encounter a symbol that is already in the map, we error and exit.

This patch changes the error to only happen when a symbol we care about (because we are either writing to it or reading from it) occurs multiple times.

This lets us parse ELFs even when they have multiple symbols with the same name and only error if it actually matters.

This issue was brought up by @nspin.