kernel/generic: fix the arm gc-sections patch
authorRui Salvaterra <rsalvaterra@gmail.com>
Fri, 23 Jul 2021 12:34:49 +0000 (13:34 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 25 Jul 2021 11:52:34 +0000 (13:52 +0200)
commit023a1366ee8138a8adbf3044814c1855c5677bb1
tree6285f747f82c5e32cde8f658e53f5c1e64153820
parent2801fe6132c4e2e364e2d5a304594185351b501b
kernel/generic: fix the arm gc-sections patch

Latest binutils (2.37) exposed a long-standing bug. The kernel linking stage
would break at the SORTTAB step, due to the exception table having been
previously purged from vmlinux, as its section wasn't marked as unconditionally
kept. Fix thusly.

Additionally, the "#define ARM_MMU_DISCARD(x) KEEP(x)" change is bogus. It
would only apply to !CONFIG_MMU devices (which we don't support in OpenWrt), and
it would even break the build if referenced. Drop it.

While at it, rename the patch in order to make it obvious that it's
arm-specific.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[Add same changes for kernel 5.4 too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/generic/hack-5.10/220-arm-gc_sections.patch [new file with mode: 0644]
target/linux/generic/hack-5.10/220-gc_sections.patch [deleted file]
target/linux/generic/hack-5.4/220-arm-gc_sections.patch [new file with mode: 0644]
target/linux/generic/hack-5.4/220-gc_sections.patch [deleted file]