aboutsummaryrefslogtreecommitdiff
path: root/src/util/elf2efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/elf2efi.c')
-rw-r--r--src/util/elf2efi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index c98c4d4..171e2b5 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -653,6 +653,12 @@ static struct pe_section * process_section ( struct elf_file *elf,
}
}
+ /* Treat 16-bit sections as hidden in hybrid binaries */
+ if ( opts->hybrid && ( strlen ( name ) > 2 ) &&
+ ( strcmp ( &name[ strlen ( name ) - 2 ], "16" ) == 0 ) ) {
+ new->hidden = 1;
+ }
+
/* Fill in section characteristics and update RVA limits */
if ( ( shdr->sh_type == SHT_PROGBITS ) &&
( shdr->sh_flags & SHF_WRITE ) ) {