Skip to content
Commit 2229a12b authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Rafael J. Wysocki
Browse files

ACPI: tables: avoid relocations for table signature array



On architectures that implement KASLR using the ELF native RELA relocation
format (such as arm64), every absolute reference in the code incurs an
overhead of 24 bytes in the .rela section. So storing a 41 element array
of 4 character signature strings using an array of pointer-to-char incurs
an 8x overhead (32 bytes per entry => ~1500 bytes), and given the fixed
length of the entries, and the fact that the array is only used locally,
it is much better to use an array of arrays here, which gets rid of the
overhead entirely.

While at it, make it __initconst, as it is never referenced except from
__init code.

Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 48778464
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment