public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Use -Wl,-z,relro -Wl,-z,now for nscd
@ 2004-10-05  8:11 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-10-05  8:11 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-05  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05  8:11 [PATCH] Use -Wl,-z,relro -Wl,-z,now for nscd Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).