mirror of https://github.com/ipxe/ipxe.git
[efi] Allow compiling elf2efi with clang
The clang compiler does not (and apparently will not ever) allow for
variable-length arrays within structs.
Work around this limitation by using a fixed-length array to hold the
PDB filename in the debug section.
This mirrors wimboot commit f52c3ff ("[efi] Allow compiling elf2efi
with clang").
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/1082/head
parent
98dd25a3bb
commit
f22879ca99
|
|
@ -961,7 +961,7 @@ create_debug_section ( struct pe_header *pe_header, const char *filename ) {
|
||||||
struct {
|
struct {
|
||||||
EFI_IMAGE_DEBUG_DIRECTORY_ENTRY debug;
|
EFI_IMAGE_DEBUG_DIRECTORY_ENTRY debug;
|
||||||
EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY rsds;
|
EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY rsds;
|
||||||
char name[ strlen ( filename ) + 1 ];
|
char name[32];
|
||||||
} *contents;
|
} *contents;
|
||||||
|
|
||||||
/* Allocate PE section */
|
/* Allocate PE section */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue