openwrt/toolchain/gcc
Felix Fietkau c1c1112006 toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE
These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).

On ARMv6 and newer, unaligned access is safe.

Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.

This patch was originally added more than 11 years ago in commit b050f87d13,
but got lost 6 years ago, when gcc 9.1 was added in 88c07c6552.

This primarily affects the kirkwood and ixp4xx targets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-07-22 12:03:05 +02:00
..
files
final Revert "toolchain: gcc: make config consistent with glibc/musl" 2025-05-02 19:30:47 +02:00
initial Revert "toolchain: gcc: make config consistent with glibc/musl" 2025-05-02 19:30:47 +02:00
minimal Revert "toolchain: gcc: make config consistent with glibc/musl" 2025-05-02 19:30:47 +02:00
patches-12.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:03:05 +02:00
patches-13.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:03:05 +02:00
patches-14.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:03:05 +02:00
patches-15.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:03:05 +02:00
common.mk toolchain: add support for GCC 15.1 2025-06-08 12:20:15 +02:00
Config.in toolchain: add support for GCC 15.1 2025-06-08 12:20:15 +02:00
Config.version toolchain: add support for GCC 15.1 2025-06-08 12:20:15 +02:00
exclude-testsuite toolchain: add gcc 7.1.0 support 2017-05-25 19:01:07 +02:00