mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
Mach-O uses "indirect symbol" ambiguously. The first kind are "indirect symbols" indicated by their type. They are located in the regular symbol table, possibly outside the local, external and undefined ranges. Their value is an index into the string table, which indicates the name of another symbol they alias. We assume these to only be used by KPIs, mostly as symbol aliases for deprecated symbol names. The second kind is the "indirect symbol table", which is merely a flat list of 32-bit indices into the symbol table. When the handling code was written, the incorrect assumption was made that the "indirect symbol table" is a range of "indirect symbols", much like how local, external and undefined symbols are explicitly indexed. However, this is not true and causes bugs in handling indirect symbols. This patch drops this incorrect (and dangerous) assumption and strictly separates the two concepts. As OpenCore does not inject KPIs, ignore indirect symbols entirely.