mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-11-08 23:27:15 -05:00
ELF: the .note section should be 4-byte aligned
The ELF .note section contains of 4-byte words and should be aligned accordingly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
@@ -6013,7 +6013,7 @@ qualifiers are:
|
|||||||
\c section .preinit_array preinit_array alloc noexec nowrite pointer
|
\c section .preinit_array preinit_array alloc noexec nowrite pointer
|
||||||
\c section .init_array init_array alloc noexec nowrite pointer
|
\c section .init_array init_array alloc noexec nowrite pointer
|
||||||
\c section .fini_array fini_array alloc noexec nowrite pointer
|
\c section .fini_array fini_array alloc noexec nowrite pointer
|
||||||
\c section .note note noalloc noexec nowrite align=1
|
\c section .note note noalloc noexec nowrite align=4
|
||||||
\c section other progbits alloc noexec nowrite align=1
|
\c section other progbits alloc noexec nowrite align=1
|
||||||
|
|
||||||
(Any section name other than those in the above table
|
(Any section name other than those in the above table
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ static const struct elf_known_section elf_known_sections[] = {
|
|||||||
{ ".preinit_array", SHT_PREINIT_ARRAY, SHF_ALLOC, -1, -1 },
|
{ ".preinit_array", SHT_PREINIT_ARRAY, SHF_ALLOC, -1, -1 },
|
||||||
{ ".init_array", SHT_INIT_ARRAY, SHF_ALLOC, -1, -1 },
|
{ ".init_array", SHT_INIT_ARRAY, SHF_ALLOC, -1, -1 },
|
||||||
{ ".fini_array", SHT_FINI_ARRAY, SHF_ALLOC, -1, -1 },
|
{ ".fini_array", SHT_FINI_ARRAY, SHF_ALLOC, -1, -1 },
|
||||||
{ ".note", SHT_NOTE, 0, 1, 0 },
|
{ ".note", SHT_NOTE, 0, 4, 0 },
|
||||||
{ NULL /*default*/, SHT_PROGBITS, SHF_ALLOC, 1, 0 }
|
{ NULL /*default*/, SHT_PROGBITS, SHF_ALLOC, 1, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user