immortalwrt-VIKINGYFY/toolchain/gcc/patches-12.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
020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch toolchain: gcc: Refresh patches 2025-05-03 22:04:13 +02:00
021-libcc1-fix-vector-include.patch toolchain: gcc: Refresh patches 2025-05-03 22:04:13 +02:00
110-Fix-MIPS-PR-84790.patch
230-musl_libssp.patch
300-mips_Os_cpu_rtx_cost_model.patch
700-RISCV-Inline-subword-atomic-ops.patch toolchain: gcc: backport inline subword atomic support for riscv 2023-06-11 17:09:06 +02:00
701-riscv-linux-Don-t-add-latomic-with-pthread.patch toolchain: gcc: backport inline subword atomic support for riscv 2023-06-11 17:09:06 +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
840-armv4_pass_fix-v4bx_to_ld.patch
850-use_shared_libgcc.patch
851-libgcc_no_compat.patch
870-ppc_no_crtsavres.patch
881-no_tm_section.patch
900-bad-mips16-crt.patch
910-mbsd_multi.patch toolchain: gcc: backport inline subword atomic support for riscv 2023-06-11 17:09:06 +02:00
920-specs_nonfatal_getenv.patch
960-gotools-fix-compilation-when-making-cross-compiler.patch
970-macos_arm64-building-fix.patch
980-fix-build-error-with-Xcode-16.3.patch toolchain: gcc: Refresh patches 2025-05-03 22:04:13 +02:00