efi eliminate bad section references
PATCH 3/3 efi eliminate bad section references
Randy please double check especially this one.
there may be a better solution.
Fix efi section references:
remove __initdata for struct efi efi_phys
and struct efi_memory_map memmap
Error: ./arch/i386/kernel/efi.o .text refers to 000000d3 R_386_32 .init.data
Error: ./arch/i386/kernel/efi.o .text refers to 000000ff R_386_32 .init.data
efi_memmap_walk (which is not __init nor static)
accesses both efi_phys and memmap.
arch/i386/kernel/efi.c renamed from arch/i386/kernel/efi.c.orig +2 -2
@@ -46,8 +46,8 @@struct efi efi;EXPORT_SYMBOL (efi); -static struct efi efi_phys__initdata ; -struct efi_memory_map memmap__initdata ; +static struct efi efi_phys; +struct efi_memory_map memmap;/* * We require an early boot_ioremap mapping mechanism initially
(adding Matt Domsch to cc:)
Quoted 6 lines · maximilian attems
Randy please double check especially this one.
there may be a better solution.Fix efi section references:
remove__initdatafor struct efiefi_phys
and structefi_memory_mapmemmap
'memmap' can be used after init, so remove __initdata from it certainly looks correct to me.
Regarding efi_phys:
'efi_get_time' can be called after init (that "inline ... _init" on it is confusing to me), and it calls phys_efi_get_time(), which uses 'efi_phys', so efi_phys should not be marked as __initdata.
OTOH, phys_efi_set_virtual_address_map() can be marked as __init. You could add that as an efficiency measure.
so
Quoted 23 lines
Error:
./arch/i386/kernel/efi.o.text refers to000000d3R_386_32.init.data
Error:./arch/i386/kernel/efi.o.text refers to000000ffR_386_32.init.data
efi_memmap_walk(which is not__initnor static) accesses bothefi_physand memmap.Signed-off-by maximilian attems <[email protected]>arch/i386/kernel/efi.c renamed from arch/i386/kernel/efi.c.orig +2
-2@@ -46,8 +46,8 @@struct efi efi;EXPORT_SYMBOL (efi); -static struct efi efi_phys__initdata ; -struct efi_memory_map memmap__initdata ; +static struct efi efi_phys; +struct efi_memory_map memmap;/* * We require an early boot_ioremap mapping mechanism initially
Signature · 1 line
~Randy