[PATCH v4 3/3] modversions: treat symbol CRCs as 32 bit quantities on 64 bit archs
Linus Torvalds
torvalds at linux-foundation.org
Wed Jan 18 10:47:04 AEDT 2017
On Tue, Jan 17, 2017 at 11:26 AM, Ard Biesheuvel
<ard.biesheuvel at linaro.org> wrote:
> The modversion symbol CRCs are emitted as ELF symbols, which allows us to
> easily populate the kcrctab sections by relying on the linker to associate
> each kcrctab slot with the correct value.
>
> This has a couple of downsides:
So the whole relocation of the crc is obviously completely crazy, but
you don't actually seem to *change* that. You just work around it, and
you make the symbols 32-bit. The latter part I agree with
whole-heartedly, btw.
But do we really have to accept this relocation insanity?
So I don't actually disagree with this patch 3/3 (turning the whole
crc array into an array of "u32" is clearly the right thing to do),
but the two other patches look oddly broken.
Why are those CRC's relocatable to begin with? Shouldn't they be
absolute values? Why do they get those idiotic relocation things? They
seem to be absolute on x86-64 (just doing a 'nm vmlinux', so I might
be missing something), why aren't they on ppc?
Is there something wrong with our generation script? Can we possibly
do something like
- printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc);
+ printf("%s__crc_%s = ABSOLUTE(0x%08lx) ;\n", mod_prefix, name, crc);
in genksyms.c to get rid of the crazty relocation entries?
Linus
More information about the Linuxppc-dev
mailing list