MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / RebaseImageRead

Function RebaseImageRead

BaseTools/Source/C/VolInfo/VolInfo.c:1353–1394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1351}
1352
1353EFI_STATUS
1354RebaseImageRead (
1355 IN VOID *FileHandle,
1356 IN UINTN FileOffset,
1357 IN OUT UINT32 *ReadSize,
1358 OUT VOID *Buffer
1359 )
1360/*++
1361
1362Routine Description:
1363
1364 Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file
1365
1366Arguments:
1367
1368 FileHandle - The handle to the PE/COFF file
1369
1370 FileOffset - The offset, in bytes, into the file to read
1371
1372 ReadSize - The number of bytes to read from the file starting at FileOffset
1373
1374 Buffer - A pointer to the buffer to read the data into.
1375
1376Returns:
1377
1378 EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset
1379
1380--*/
1381{
1382 CHAR8 *Destination8;
1383 CHAR8 *Source8;
1384 UINT32 Length;
1385
1386 Destination8 = Buffer;
1387 Source8 = (CHAR8 *) ((UINTN) FileHandle + FileOffset);
1388 Length = *ReadSize;
1389 while (Length--) {
1390 *(Destination8++) = *(Source8++);
1391 }
1392
1393 return EFI_SUCCESS;
1394}
1395
1396EFI_STATUS
1397SetAddressToSectionHeader (

Callers 1

GenFw.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected