On 17/03/2022 11:08, Roger Pau Monne wrote: > A side effect of ignoring such sections is that symbols belonging to > them won't be resolved, and that could make relocations belonging to > other sections that reference those symbols fail. > > For example it's likely to have an empty .altinstr_replacement with > symbols pointing to it, and marking the section as ignored will > prevent the symbols from being resolved, which in turn will cause any > relocations against them to fail.
I agree this is a bug in livepatch handling, but it's also an error in the generated livepatch. We should not have relocations to an empty altinstr_replacement section in the first place. This will probably be from the lfences, where the replacement in a nop and takes no space. I think I know how to fix this case. ~Andrew