mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcMachoLib: Retrieve symbol section via Section instead of Value.
This commit is contained in:
parent
2ac0ee8085
commit
bbea9dba45
@ -555,7 +555,11 @@ MachoRelocateSymbol64 (
|
||||
// Symbols are relocated when they describe sections.
|
||||
//
|
||||
if (MachoSymbolIsSection (Symbol)) {
|
||||
Section = MachoGetSectionByAddress64 (Context, Symbol->Value);
|
||||
if (Symbol->Section > MAX_SECT) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Section = MachoGetSectionByIndex64 (Context, (Symbol->Section - 1));
|
||||
if (Section == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user