[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/elf/tst-execstack-mod.c b/ap/libc/glibc/glibc-2.22/elf/tst-execstack-mod.c
new file mode 100644
index 0000000..038e655
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/elf/tst-execstack-mod.c
@@ -0,0 +1,30 @@
+/* Test module for making nonexecutable stacks executable
+   on load of a DSO that requires executable stacks.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void callme (void (*callback) (void));
+
+/* This is a function that makes use of executable stack by
+   using a local function trampoline.  */
+void
+tryme (void)
+{
+  bool ok = false;
+  void callback (void) { ok = true; }
+
+  callme (&callback);
+
+  if (ok)
+    printf ("DSO called ok (local %p, trampoline %p)\n", &ok, &callback);
+  else
+    abort ();
+}
+
+void
+callme (void (*callback) (void))
+{
+  (*callback) ();
+}