Como dizer ao gcc para desativar o preenchimento no struct? [duplicado]

Esta pergunta já tem uma resposta aqui:

alinhamento de memória nas estruturas gcc 6 respostas

Não tenho certeza se é normal ou se é um bug do compilador, mas tenho uma estrutura C com muitos membros. Entre eles, há:

struct list {
    ...  
    ...
    const unsigned char nop=0x90; // 27 bytes since the begining of the structure
    const unsigned char jump=0xeb; // 28 bytes since the begining of the structure
    const unsigned char hlt=0xf4; // 29 bytes since the begining of the structure
    unsigned __int128 i=0xeb90eb90eb90eb90f4f4 // should start at the 30th byte, but get aligned on a 16 byte boundary and starts on the 32th byte instead
    const unsigned char data=0x66; // should start at the 46th byte, but start on the 48th instead.
}; // end of struct list.

Tive dificuldade para descobrir por que meu programa não estava funcionando, mas finalmente descobriexiste um intervalo de 2 bytes entrehltei que é definido como 0x0. Isso significa que oi está ficando alinhado.
Isso fica muito claro quando imprimo essa parte da estrutura, porque com:

for(int i=28;i<35;i++)
    printf("%02hhX",buf[i]);

eu receboEBF40000EB90EB90 na tela.

Eu tentei coisas comovolatile struct list data;no meu programa, mas não mudou o problema de alinhamento.

Então, existe um#pragma ou um__attribute__para dizer ao gcc para não alinhari dentrostruct listtipo ?

questionAnswers(3)

yourAnswerToTheQuestion