Re: [PATCHv6 15/30] x86/boot: Port I/O: allow to hook up alternative helpers

From: Thomas Gleixner
Date: Fri Mar 18 2022 - 10:22:07 EST


On Thu, Mar 17 2022 at 23:10, Kirill A. Shutemov wrote:
> On Thu, Mar 17, 2022 at 01:12:59PM +0100, Thomas Gleixner wrote:
>> #define DEFINE_PORT_IO_OPS() \
>> struct port_io_ops pio_ops = { \
>> .inb = __inb, \
>> .outb = __outb, \
>> .outw = __outw, }
>>
>> Hmm?
>
> This kind of initializations are problematic. They generate run-time
> relacations that kernel cannot handle in the boot stub. Linker complains
> about this:
>
> ld.lld: error: Unexpected run-time relocations (.rela) detected!
>
> I will leave it as is, unless you have better ideas.

Bah, did not think about that.

Thanks,

tglx