section mismatch error in aesgcm causing a build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm getting this in 6.13-rc1:

/home/jejb/git/linux-tpm/lib/crypto/aesgcm.c:212:29: error: ptext1
causes a section type conflict with aesgcm_tv
 static const u8 __initconst ptext1[16];
                             ^~~~~~
/home/jejb/git/linux-tpm/lib/crypto/aesgcm.c:570:9: note: ‘aesgcm_tv’ was declared here
 } const aesgcm_tv[] __initconst = {
         ^~~~~~~~~
make[5]: *** [/home/jejb/git/linux-tpm/scripts/Makefile.build:194: lib/crypto/aesgcm.o] Error 1
/home/jejb/git/linux-tpm/lib/crypto/aesgcm.c:212:29: error: ptext1 causes a section type conflict with aesgcm_tv
 static const u8 __initconst ptext1[16];
                             ^~~~~~
/home/jejb/git/linux-tpm/lib/crypto/aesgcm.c:570:9: note: ‘aesgcm_tv’ was declared here
 } const aesgcm_tv[] __initconst = {
         ^~~~~~~~~
make[5]: *** [/home/jejb/git/linux-tpm/scripts/Makefile.build:194: lib/crypto/aesgcm.o] Error 1

I think it's way older than 6.13-rc1, but the inclusion of the sevguest
driver in the merge window now means that something actually selects
it.  I can fix it simply by adding a zero initialization to the file:

-static const u8 __initconst ptext1[16];
+static const u8 __initconst ptext1[16] = { 0 };

Which I think means that by default the traditional zero initialization
of a static variable is in the wrong section (and actually likely is
wrong for all our __initX variables as well).

In case it matters, this is with gcc-7

Regards,

James





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux