mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-22 09:17:39 +02:00
ImageTool: Make ELF SymbolsPath optional
This commit is contained in:
parent
5c75aaa8a7
commit
1edfc1f6b7
@ -652,7 +652,7 @@ ScanElf (
|
||||
OUT image_tool_image_info_t *ImageInfo,
|
||||
IN const void *File,
|
||||
IN uint32_t FileSize,
|
||||
IN const char *SymbolsPath
|
||||
IN const char *SymbolsPath OPTIONAL
|
||||
)
|
||||
{
|
||||
RETURN_STATUS Status;
|
||||
@ -678,7 +678,12 @@ ScanElf (
|
||||
ImageInfo->HeaderInfo.IsXip = true;
|
||||
ImageInfo->SegmentInfo.SegmentAlignment = (uint32_t)Context.Alignment;
|
||||
ImageInfo->RelocInfo.RelocsStripped = false;
|
||||
|
||||
if (SymbolsPath != NULL) {
|
||||
ImageInfo->DebugInfo.SymbolsPathLen = strlen (SymbolsPath);
|
||||
} else {
|
||||
assert (ImageInfo->DebugInfo.SymbolsPathLen == 0);
|
||||
}
|
||||
|
||||
switch (Ehdr->e_machine) {
|
||||
#if ELF_ARCH == 64
|
||||
@ -707,7 +712,11 @@ ScanElf (
|
||||
return RETURN_OUT_OF_RESOURCES;
|
||||
};
|
||||
|
||||
if (SymbolsPath != NULL) {
|
||||
memmove (ImageInfo->DebugInfo.SymbolsPath, SymbolsPath, ImageInfo->DebugInfo.SymbolsPathLen + 1);
|
||||
} else {
|
||||
*ImageInfo->DebugInfo.SymbolsPath = '\0';
|
||||
}
|
||||
|
||||
//
|
||||
// There is no corresponding ELF property.
|
||||
|
@ -10,7 +10,7 @@ ScanElf (
|
||||
OUT image_tool_image_info_t *ImageInfo,
|
||||
IN const void *File,
|
||||
IN uint32_t FileSize,
|
||||
IN const char *SymbolsPath
|
||||
IN const char *SymbolsPath OPTIONAL
|
||||
)
|
||||
{
|
||||
RETURN_STATUS Status;
|
||||
|
@ -15,7 +15,7 @@ ScanElf32 (
|
||||
OUT image_tool_image_info_t *ImageInfo,
|
||||
IN const void *File,
|
||||
IN uint32_t FileSize,
|
||||
IN const char *SymbolsPath
|
||||
IN const char *SymbolsPath OPTIONAL
|
||||
);
|
||||
|
||||
RETURN_STATUS
|
||||
@ -23,7 +23,7 @@ ScanElf64 (
|
||||
OUT image_tool_image_info_t *ImageInfo,
|
||||
IN const void *File,
|
||||
IN uint32_t FileSize,
|
||||
IN const char *SymbolsPath
|
||||
IN const char *SymbolsPath OPTIONAL
|
||||
);
|
||||
|
||||
#endif // ELF_SCAN_COMMON_H
|
||||
|
@ -137,7 +137,7 @@ ScanElf (
|
||||
OUT image_tool_image_info_t *ImageInfo,
|
||||
IN const void *File,
|
||||
IN uint32_t FileSize,
|
||||
IN const char *SymbolsPath
|
||||
IN const char *SymbolsPath OPTIONAL
|
||||
);
|
||||
|
||||
extern CONST UINT8 mHiiResourceSectionHeaderSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user