#
1a557982 |
|
07-Jan-2019 |
Simon Shields <simon.shields@data61.csiro.au> |
elfloader: fix ARM CPUID message on EFI At O2 and higher, the switch gets optimised into a table of strings. Unfortunately, the compiler doesn't properly handle this when building position-independent code with -fpic - the switch gets turned into this: 404b30: f0000021 adrp x1, 40b000 <cpio_ls+0x4e0> 404b34: 910cc021 add x1, x1, #0x330 404b38: f8605820 ldr x0, [x1, w0, uxtw #3] 404b3c: d65f03c0 ret which will return the un-relocated address of the string, rather than the position-independent address. Fix this by forcing the two affected functions to use O1 even in release builds.
|