components/openssl/openssl-1.0.1/patches/23-noexstack.patch
author Sunil Kumar H G - Oracle Corporation - Bangalore India <sunil.kumar.h.g@oracle.com>
Tue, 02 Jul 2013 22:08:00 -0700
branchs11-update
changeset 2662 240ac3c3ac55
parent 2593 b92e6df5eaf0
permissions -rw-r--r--
16730811 convert(1) dumps core when processing PDF file

--- /tmp/Makefile.shared	Mon Feb 14 14:33:05 2011
+++ openssl-1.0.0d/Makefile.shared	Mon Feb 14 14:35:56 2011
@@ -389,6 +389,7 @@
 		SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-Bsymbolic"; \
 	fi; \
 	$(LINK_SO_A)
+# Make sure the apps have non-executable stacks and data (x86/x64 only).
 link_app.solaris:
 	@ if $(DETECT_GNU_LD); then \
 		$(DO_GNU_APP); \
@@ -395,6 +396,10 @@
 	else \
 		LDFLAGS="$(CFLAGS)"; \
 	fi; \
+	if expr $(PLATFORM) : '.*x86.*' > /dev/null; then \
+		LDFLAGS="$${LDFLAGS} -M/usr/lib/ld/map.noexdata"; \
+	fi; \
+	LDFLAGS="$${LDFLAGS} -M/usr/lib/ld/map.noexstk -M/usr/lib/ld/map.pagealign"; \
 	$(LINK_APP)
 
 # OpenServer 5 native compilers used