[v2,2/3] libsepol/Makefile: add -fno-semantic-interposition
diff mbox series

Message ID 20200310210854.466-3-william.c.roberts@intel.com
State Accepted
Headers show
  • [v2,1/3] libsepol/dso: drop hidden_proto and hidden_def
Related show

Commit Message

William Roberts March 10, 2020, 9:08 p.m. UTC
From: William Roberts <william.c.roberts@intel.com>

Add -fno-semantic-interposition to CFLAGS. This will restore
the DSO infrastructures protections to insure internal callers
of exported symbols call into libselinux and not something loading first
in the library list.

Clang has this enabled by default.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
 libsepol/src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile
index ccb702338446..8d466f56ed0e 100644
--- a/libsepol/src/Makefile
+++ b/libsepol/src/Makefile
@@ -19,7 +19,7 @@  LIBMAP=libsepol.map
 OBJS= $(patsubst %.c,%.o,$(sort $(wildcard *.c)))
 LOBJS= $(patsubst %.c,%.lo,$(sort $(wildcard *.c)))
-CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2
+CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -fno-semantic-interposition
 override CFLAGS += -I. -I../include -D_GNU_SOURCE