From: Icenowy Zheng Date: Fri, 13 Dec 2024 10:36:02 +0000 (+0800) Subject: MIPS: add .note.GNU-stack section to assembly sources (#872) X-Git-Tag: upstream/3.4.7~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f515eac04cf8e5f594d5d9dee5fb7dfc3a186a4c;p=platform%2Fupstream%2Flibffi.git MIPS: add .note.GNU-stack section to assembly sources (#872) To build ELF shared libraries that do not require executable stack on MIPS, every object file linked should have a .note.GNU-stack section, otherwise the linker defaults to executable stack. As libffi shouldn't require executable stack, add the .note.GNU-stack section to the assembly source files under src/mips, like other architectures. Signed-off-by: Icenowy Zheng --- diff --git a/src/mips/n32.S b/src/mips/n32.S index df58e80..08cbb95 100644 --- a/src/mips/n32.S +++ b/src/mips/n32.S @@ -821,3 +821,7 @@ cls_epilogue: #endif /* __GNUC__ */ #endif + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",%progbits +#endif diff --git a/src/mips/o32.S b/src/mips/o32.S index 78517be..03ceed5 100644 --- a/src/mips/o32.S +++ b/src/mips/o32.S @@ -559,3 +559,7 @@ $LASFDE2: $LEFDE2: #endif + +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",%progbits +#endif