opa-ff/SOURCES/0001-Link-executables-with-pie.patch
2021-10-08 14:13:39 +00:00

45 lines
1.7 KiB
Diff

From bd97a198a83d59ba26db24dfb99c9f65f218c6c4 Mon Sep 17 00:00:00 2001
From: Honggang Li <honli@redhat.com>
Date: Tue, 11 Jun 2019 09:20:52 -0400
Subject: [PATCH 1/3] Link executables with '-pie'
Signed-off-by: Honggang Li <honli@redhat.com>
---
Esm/ib/src/linux/startup/fm_config/Makefile | 4 ++--
Makerules/Maketargets.build | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Esm/ib/src/linux/startup/fm_config/Makefile b/Esm/ib/src/linux/startup/fm_config/Makefile
index 2270be9921ec..59796585e8e4 100644
--- a/Esm/ib/src/linux/startup/fm_config/Makefile
+++ b/Esm/ib/src/linux/startup/fm_config/Makefile
@@ -150,10 +150,10 @@ include $(TL_DIR)/Makerules/Maketargets.build
include $(TL_DIR)/Makerules/Maketargets.install
$(BUILDDIR)/config_check: $(BUILDDIR)/config_check.o
- $(VS)$(CC) $(LDFLAGS)$@ $(BUILDDIR)/config_check.o $(LDLIBS)
+ $(VS)$(CC) -pie $(LDFLAGS)$@ $(BUILDDIR)/config_check.o $(LDLIBS)
$(BUILDDIR)/config_convert: $(BUILDDIR)/config_convert.o
- $(VS)$(CC) $(LDFLAGS)$@ $(BUILDDIR)/config_convert.o $(LDLIBS)
+ $(VS)$(CC) -pie $(LDFLAGS)$@ $(BUILDDIR)/config_convert.o $(LDLIBS)
# install for stage phase
#include $(TL_DIR)/Makerules/Maketargets.stage
diff --git a/Makerules/Maketargets.build b/Makerules/Maketargets.build
index ebf9fdfdf8dd..9cd78442fc49 100755
--- a/Makerules/Maketargets.build
+++ b/Makerules/Maketargets.build
@@ -127,7 +127,7 @@ else # BUILD_TARGET_OS is not VXWORKS
$(CMD_TARGETS_EXE) : $(CT_OBJECTS) $(RSCOBJECTS) $(DEPLIBS_TARGETS)
@echo Linking executable...
@mkdir -p $(dir $@)
- $(VS)$(CC) $(LDFLAGS)$@ $(CT_OBJECTS) $(LDLIBS)
+ $(VS)$(CC) -pie $(LDFLAGS)$@ $(CT_OBJECTS) $(LDLIBS)
endif # BUILD_TARGET_OS is VXWORKS
endif # CMD_TARGETS_EXE non-null
--
2.25.4