From e37cd0f2f59d04b7e18bc4a425c367f92523b1cd Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Fri, 30 Dec 2022 23:18:08 +0000 Subject: x1000: Enable NOCROSSREFS_TO() Start enforcing the correctness of references to the .init section. Change-Id: I507891a25be9cccff4cf8ec13fdc799b73c75176 --- firmware/target/mips/ingenic_x1000/app.lds | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware') diff --git a/firmware/target/mips/ingenic_x1000/app.lds b/firmware/target/mips/ingenic_x1000/app.lds index fe06e1cd8d..a1e84fb9cf 100644 --- a/firmware/target/mips/ingenic_x1000/app.lds +++ b/firmware/target/mips/ingenic_x1000/app.lds @@ -153,3 +153,8 @@ SECTIONS *(.rel.dyn); } } + +#if defined(HAVE_NOCROSSREFS_TO) && defined(HAVE_INIT_ATTR) +/* Prevent accidental references to the .init section from other sections */ +NOCROSSREFS_TO(.init .text .iram .tcsm); +#endif -- cgit v1.2.3