]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
modules: Add missing entry for __ex_table
authorHelge Deller <deller@gmx.de>
Wed, 22 Nov 2023 22:18:14 +0000 (23:18 +0100)
committerLuis Chamberlain <mcgrof@kernel.org>
Sat, 19 Oct 2024 20:40:42 +0000 (13:40 -0700)
The entry for __ex_table was missing, which may make __ex_table
become 1- or 2-byte aligned in modules.
Add the entry to ensure it gets 32-bit aligned.

As per unaligned-memory-access [0] "unaligned memory accesses [...]
will not work correctly on certain platforms and will cause performance
problems on others", so fix this.

Signed-off-by: Helge Deller <deller@gmx.de>
[mcgrof: added unaligned-memory-access justification]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/core-api/unaligned-memory-access.rst
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
scripts/module.lds.S

index 23f9912179ceee909a3143d05aba0c30362a8ac9..69b2423e27ab4d8fc0525a4c8e1aeef824b495e7 100644 (file)
@@ -29,6 +29,7 @@ SECTIONS {
        .altinstructions        0 : ALIGN(8) { KEEP(*(.altinstructions)) }
        __bug_table             0 : ALIGN(8) { KEEP(*(__bug_table)) }
        __jump_table            0 : ALIGN(8) { KEEP(*(__jump_table)) }
+       __ex_table              0 : ALIGN(4) { KEEP(*(__ex_table)) }
 
        __patchable_function_entries : { *(__patchable_function_entries) }