mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcMachoLib: Return non-CONST pointers.
This commit is contained in:
parent
59c2692fa2
commit
d6636d80ba
@ -172,7 +172,7 @@ MachoGetNextSection64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_SECTION_64 *
|
||||
MACH_SECTION_64 *
|
||||
MachoGetSectionByIndex64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINTN Index
|
||||
@ -187,7 +187,7 @@ MachoGetSectionByIndex64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_SECTION_64 *
|
||||
MACH_SECTION_64 *
|
||||
MachoGetSectionByAddress64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT64 Address
|
||||
@ -235,7 +235,7 @@ MachoSymbolIsLocalDefined (
|
||||
@param[in] Name Name of the symbol to locate.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetLocalDefinedSymbolByName (
|
||||
IN OUT VOID *Context,
|
||||
IN CONST CHAR8 *Name
|
||||
@ -250,7 +250,7 @@ MachoGetLocalDefinedSymbolByName (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetSymbolByIndex64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT32 Index
|
||||
@ -503,7 +503,7 @@ MachoVtableGetNumberOfEntries64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetMetaclassSymbolFromSmcpSymbol64 (
|
||||
IN OUT VOID *Context,
|
||||
IN CONST MACH_NLIST_64 *Smcp
|
||||
|
||||
@ -555,7 +555,7 @@ MachoVtableGetNumberOfEntries64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetMetaclassSymbolFromSmcpSymbol64 (
|
||||
IN OUT VOID *Context,
|
||||
IN CONST MACH_NLIST_64 *Smcp
|
||||
|
||||
@ -478,7 +478,7 @@ MachoGetNextSection64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_SECTION_64 *
|
||||
MACH_SECTION_64 *
|
||||
MachoGetSectionByIndex64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINTN Index
|
||||
@ -497,7 +497,7 @@ MachoGetSectionByIndex64 (
|
||||
Segment = MachoGetNextSegment64 (Context, Segment)
|
||||
) {
|
||||
if (Index <= (SectionIndex + (Segment->NumSections - 1))) {
|
||||
return &Segment->Sections[Index - SectionIndex];
|
||||
return (MACH_SECTION_64 *)&Segment->Sections[Index - SectionIndex];
|
||||
}
|
||||
|
||||
SectionIndex += Segment->NumSections;
|
||||
@ -515,7 +515,7 @@ MachoGetSectionByIndex64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_SECTION_64 *
|
||||
MACH_SECTION_64 *
|
||||
MachoGetSectionByAddress64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT64 Address
|
||||
@ -539,7 +539,7 @@ MachoGetSectionByAddress64 (
|
||||
for (Index = 0; Index < Segment->NumSections; ++Index) {
|
||||
if ((Address >= Section->Address)
|
||||
&& (Address < Section->Address + Section->Size)) {
|
||||
return Section;
|
||||
return (MACH_SECTION_64 *)Section;
|
||||
}
|
||||
|
||||
++Section;
|
||||
|
||||
@ -55,7 +55,7 @@ InternalRetrieveSymtabs64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_RELOCATION_INFO *
|
||||
MACH_RELOCATION_INFO *
|
||||
InternalGetExternalRelocationByOffset (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT64 Address
|
||||
|
||||
@ -74,7 +74,7 @@ MachoPreserveRelocationIntel64 (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_RELOCATION_INFO *
|
||||
MACH_RELOCATION_INFO *
|
||||
InternalGetExternalRelocationByOffset (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT64 Address
|
||||
@ -119,7 +119,7 @@ InternalGetExternalRelocationByOffset (
|
||||
}
|
||||
|
||||
if ((UINT64)Relocation->Address == Address) {
|
||||
return Relocation;
|
||||
return (MACH_RELOCATION_INFO *)Relocation;
|
||||
}
|
||||
//
|
||||
// Relocation Pairs can be skipped.
|
||||
|
||||
@ -174,7 +174,7 @@ MachoSymbolIsLocalDefined (
|
||||
@retval NULL NULL is returned on failure.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetSymbolByIndex64 (
|
||||
IN OUT VOID *Context,
|
||||
IN UINT32 Index
|
||||
@ -198,7 +198,7 @@ MachoGetSymbolByIndex64 (
|
||||
if (Index < MachoContext->NumSymbols) {
|
||||
Symbol = &MachoContext->SymbolTable[Index];
|
||||
if (InternalSymbolIsSane (MachoContext, Symbol)) {
|
||||
return Symbol;
|
||||
return (MACH_NLIST_64 *)Symbol;
|
||||
}
|
||||
} else {
|
||||
ASSERT (FALSE);
|
||||
@ -263,7 +263,7 @@ MachoGetSymbolByExternRelocationOffset64 (
|
||||
|
||||
**/
|
||||
STATIC
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
InternalGetSymbolByName (
|
||||
IN CONST MACH_NLIST_64 *SymbolTable,
|
||||
IN CONST CHAR8 *StringTable,
|
||||
@ -284,7 +284,7 @@ InternalGetSymbolByName (
|
||||
(StringTable + SymbolTable[Index].UnifiedName.StringIndex)
|
||||
);
|
||||
if (Result == 0) {
|
||||
return &SymbolTable[Index];
|
||||
return (MACH_NLIST_64 *)&SymbolTable[Index];
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ InternalGetSymbolByName (
|
||||
@param[in] Name Name of the symbol to locate.
|
||||
|
||||
**/
|
||||
CONST MACH_NLIST_64 *
|
||||
MACH_NLIST_64 *
|
||||
MachoGetLocalDefinedSymbolByName (
|
||||
IN OUT VOID *Context,
|
||||
IN CONST CHAR8 *Name
|
||||
@ -346,7 +346,7 @@ MachoGetLocalDefinedSymbolByName (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return Symbol;
|
||||
return (MACH_NLIST_64 *)Symbol;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user