On Mon, Jun 17, 2019 at 6:35 AM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote: > > Hi, > > while digging through a ClangBuiltLinux issue when linking with LLD > linker on x86-64 I checked the settings for... > > .rodata.cst16 and .rodata.cst32 > > ...in crypto tree and fell over this change in... > > commit "crypto: x86/crct10dif-pcl - cleanup and optimizations": > > -.section .rodata.cst16.SHUF_MASK, "aM", @progbits, 16 > +.section .rodata.cst32.byteshift_table, "aM", @progbits, 32 > .align 16 > > Is that a typo? > I would have expected... > .rodata.cst32.XXX -> .align 32 > or > rodata.cst16.XXX -> .align 16 > > But I might be wrong as I am no expert for crypto and x86/asm. > > Thanks in advance. > > Regards, > - Sedat - > > [1] https://github.com/ClangBuiltLinux/linux/issues/431 > [2] https://bugs.llvm.org/show_bug.cgi?id=42289 > [3] https://git.kernel.org/linus/0974037fc55c + Peter, Fangrui (who have looked at this, and started looking into this from LLD's perspective) In fact, looking closer at that diff, the section in question previously had 32b alignment. Eric, was that change intentional? It seems funny to have a 32b entity size but a 16b alignment. PDF page 81 / printed page 67 of this doc: https://web.eecs.umich.edu/~prabal/teaching/resources/eecs373/Assembler.pdf says: "The linker may remove duplicates within sections with the same name, same entity size and same flags. " So for us, LLD is NOT merging these sections due to differing alignments, which is producing warnings when loading such kernel modules that link against these object files. -- Thanks, ~Nick Desaulniers