mirror of git://sourceware.org/git/glibc.git
Define relro-LDFLAGS if have-z-relro==yes. Add it to LDFLAGS.so and LDFLAGS-rtld. (+link): Add relro-LDFLAGS.
This commit is contained in:
parent
a5ee0b9e12
commit
1c563add69
10
Makeconfig
10
Makeconfig
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 1991-2000,01,02, 03 Free Software Foundation, Inc.
|
# Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -389,11 +389,17 @@ LDFLAGS.so += $(combreloc-LDFLAGS)
|
||||||
LDFLAGS-rtld += $(combreloc-LDFLAGS)
|
LDFLAGS-rtld += $(combreloc-LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (yes,$(have-z-relro))
|
||||||
|
relro-LDFLAGS = -Wl,-z,relro
|
||||||
|
LDFLAGS.so += $(relro-LDFLAGS)
|
||||||
|
LDFLAGS-rtld += $(relro-LDFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
# Command for linking programs with the C library.
|
# Command for linking programs with the C library.
|
||||||
ifndef +link
|
ifndef +link
|
||||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||||
$(combreloc-LDFLAGS) \
|
$(combreloc-LDFLAGS) $(relro-LDFLAGS) \
|
||||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||||
$(+preinit) $(+prector) \
|
$(+preinit) $(+prector) \
|
||||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||||
|
|
Loading…
Reference in New Issue