[rds-devel] [PATCH v2] module: Make sure relocations are applied to the per-CPU section
Peter Zijlstra
peterz at infradead.org
Thu Jun 5 14:39:00 UTC 2025
On Thu, Jun 05, 2025 at 03:44:23PM +0200, Petr Pavlu wrote:
> For instance:
>
> /*
> * Don't bother with non-allocated sections.
> *
> * An exception is the percpu section, which has separate allocations
> * for individual CPUs. We relocate the percpu section in the initial
> * ELF template and subsequently copy it to the per-CPU destinations.
> */
> if (!(info->sechdrs[infosec].sh_flags & SHF_ALLOC) &&
> infosec != info->index.pcpu)
> continue;
Right, and pcpu is a data section and should not have relative
relocations, only absolute.
So copying things should not be a problem.
More information about the rds-devel
mailing list