arm64/efi: efistub: Apply __init annotation
This ensures all stub component are freed when the kernel proper is done booting, by prefixing the names of all ELF sections that have the SHF_ALLOC attribute with ".init". This approach ensures that even implicitly emitted allocated data (like initializer values and string literals) are covered. At the same time, remove some __init annotations in the stub that have now become redundant, and add the __init annotation to handle_kernel_image which will now trigger a section mismatch warning without it. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:

committed by
Matt Fleming

parent
2859dff97e
commit
ddeeefe2df
@@ -101,7 +101,7 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
unsigned long __init get_dram_base(efi_system_table_t *sys_table_arg)
|
||||
unsigned long get_dram_base(efi_system_table_t *sys_table_arg)
|
||||
{
|
||||
efi_status_t status;
|
||||
unsigned long map_size;
|
||||
|
Reference in New Issue
Block a user