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

Thomas Gleixner
2022-03-18T14:22:07Z

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