From f6f5451caf2e90ef64f9965c1ac32ddd0cbe190c Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Wed, 9 Aug 2017 16:33:10 +0900 Subject: [PATCH] apply ASLR to excutable Change-Id: If1654989a6b634f42c297c2ccaf810a0db0f1cf6 --- libs/gst/helpers/Makefile.am | 6 ++++-- tools/Makefile.am | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/gst/helpers/Makefile.am b/libs/gst/helpers/Makefile.am index 0ae9ab0..8b181be 100644 --- a/libs/gst/helpers/Makefile.am +++ b/libs/gst/helpers/Makefile.am @@ -13,14 +13,16 @@ helpers_PROGRAMS = gst-plugin-scanner helpersdir=$(libexecdir)/gstreamer-$(GST_API_VERSION) gst_plugin_scanner_SOURCES = gst-plugin-scanner.c -gst_plugin_scanner_CFLAGS = $(GST_OBJ_CFLAGS) +gst_plugin_scanner_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE gst_plugin_scanner_LDADD = $(GST_OBJ_LIBS) +gst_plugin_scanner_LDFLAGS = -pie if HAVE_PTP helpers_PROGRAMS += gst-ptp-helper gst_ptp_helper_SOURCES = gst-ptp-helper.c -gst_ptp_helper_CFLAGS = $(GST_OBJ_CFLAGS) $(GIO_CFLAGS) +gst_ptp_helper_CFLAGS = $(GST_OBJ_CFLAGS) $(GIO_CFLAGS) -fPIE gst_ptp_helper_LDADD = $(GST_OBJ_LIBS) $(GIO_LIBS) $(CAP_LIBS) +gst_ptp_helper_LDFLAGS = -pie endif install-exec-hook: install-helpersPROGRAMS diff --git a/tools/Makefile.am b/tools/Makefile.am index 46f814d..1922fa8 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -4,19 +4,22 @@ bin_PROGRAMS = \ gst-typefind-@GST_API_VERSION@ gst_inspect_@GST_API_VERSION@_SOURCES = gst-inspect.c tools.h -gst_inspect_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) +gst_inspect_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE gst_inspect_@GST_API_VERSION@_LDADD = $(GST_OBJ_LIBS) +gst_inspect_@GST_API_VERSION@_LDFLAGS = -pie gst_typefind_@GST_API_VERSION@_SOURCES = gst-typefind.c tools.h -gst_typefind_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) +gst_typefind_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE gst_typefind_@GST_API_VERSION@_LDADD = $(GST_OBJ_LIBS) +gst_typefind_@GST_API_VERSION@_LDFLAGS = -pie if !GST_DISABLE_PARSE bin_PROGRAMS += gst-launch-@GST_API_VERSION@ gst_launch_@GST_API_VERSION@_SOURCES = gst-launch.c tools.h -gst_launch_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) +gst_launch_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS) -fPIE gst_launch_@GST_API_VERSION@_LDADD = $(GST_OBJ_LIBS) +gst_launch_@GST_API_VERSION@_LDFLAGS = -pie endif manpages = \ -- 2.7.4