This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use -Wl,-z,relro -Wl,-z,now for nscd


Hi!

nscd is a daemon, so -Wl,-z,now doesn't hurt that much and more protection
never hurts (before this patch nscd wasn't even relro).

2004-10-05  Jakub Jelinek  <jakub@redhat.com>

	* nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro.
	($(objpfx)nscd): Add $(relro-LDFLAGS).

--- libc/nscd/Makefile.jj	2004-10-05 01:26:22.000000000 +0200
+++ libc/nscd/Makefile	2004-10-05 09:49:47.410559767 +0200
@@ -94,9 +94,13 @@ CFLAGS-selinux.c += -fpie
 CFLAGS-initgrcache.c += -fpie
 CFLAGS-gai.c += -fpie
 
+ifeq (yes,$(have-z-relro))
+relro-LDFLAGS += -Wl,-z,now
+endif
+
 $(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
 	$(LINK.o) -pie -Wl,-O1 \
-	  $(sysdep-LDFLAGS) $(config-LDFLAGS) \
+	  $(sysdep-LDFLAGS) $(config-LDFLAGS) $(relro-LDFLAGS) \
 	  $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
 	  $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
 	  $(LDFLAGS) $(LDFLAGS-$(@F)) \

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]