openwrt-mirror/toolchain/gcc/patches-13.x
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
..
002-case_insensitive.patch
010-documentation.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
110-Fix-MIPS-PR-84790.patch
230-musl_libssp.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
300-mips_Os_cpu_rtx_cost_model.patch toolchain: gcc: update to 13.3 2024-05-28 23:55:27 +02:00
800-arm_v5te_no_ldrd_strd.patch toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:03:05 +02:00
810-arm-softfloat-libgcc.patch
820-libgcc_pic.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
840-armv4_pass_fix-v4bx_to_ld.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
850-use_shared_libgcc.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
851-libgcc_no_compat.patch
870-ppc_no_crtsavres.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
881-no_tm_section.patch
900-bad-mips16-crt.patch
910-mbsd_multi.patch toolchain: gcc: updat to 13.2 2023-07-30 13:06:56 +02:00
920-specs_nonfatal_getenv.patch toolchain: gcc: add support for GCC 13 2023-05-05 15:46:37 +02:00
960-gotools-fix-compilation-when-making-cross-compiler.patch
970-macos_arm64-building-fix.patch toolchain: gcc: update to 13.3 2024-05-28 23:55:27 +02:00
980-fix-build-error-with-Xcode-16.3.patch toolchain: gcc: Refresh patches 2025-05-03 22:04:13 +02:00