mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 22:23:08 +00:00
stand: further restrict f_kernphys_relocatable and f_tg_kernel_support
f_tg_kernel_support isn't used by any EFI code, and f_kernphys_relocatable isn't used by the non-EFI i386 code.
This commit is contained in:
parent
5ac9320ddf
commit
7bcd510a7b
@ -239,10 +239,10 @@ struct preloaded_file
|
||||
size_t f_size; /* file size */
|
||||
struct kernel_module *f_modules; /* list of modules if any */
|
||||
struct preloaded_file *f_next; /* next file */
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
#if defined(__amd64__) || (defined(__i386__) && defined(EFI))
|
||||
bool f_kernphys_relocatable;
|
||||
#endif
|
||||
#if defined(__i386__)
|
||||
#if defined(__i386__) && !defined(EFI)
|
||||
bool f_tg_kernel_support;
|
||||
#endif
|
||||
};
|
||||
|
@ -217,7 +217,7 @@ static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
#if defined(__amd64__) || (defined(__i386__) && defined(EFI))
|
||||
static bool
|
||||
is_kernphys_relocatable(elf_file_t ef)
|
||||
{
|
||||
@ -491,10 +491,10 @@ __elfN(loadfile_raw)(char *filename, uint64_t dest,
|
||||
/* Load OK, return module pointer */
|
||||
*result = (struct preloaded_file *)fp;
|
||||
err = 0;
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
#if defined(__amd64__) || (defined(__i386__) && defined(EFI))
|
||||
fp->f_kernphys_relocatable = multiboot || is_kernphys_relocatable(&ef);
|
||||
#endif
|
||||
#ifdef __i386__
|
||||
#if defined(__i386__) && !defined(EFI)
|
||||
fp->f_tg_kernel_support = is_tg_kernel_support(fp, &ef);
|
||||
#endif
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user