| From d33ce23b2160d26b27a47092da5d556b5b11a12a Mon Sep 17 00:00:00 2001 |
| From: Nathan Lynch <nathan_lynch@mentor.com> |
| Date: Wed, 3 Jun 2015 00:46:04 +0100 |
| Subject: ARM: 8385/1: VDSO: group link options |
| |
| From: Nathan Lynch <nathan_lynch@mentor.com> |
| |
| commit d33ce23b2160d26b27a47092da5d556b5b11a12a upstream. |
| |
| Currently the VDSO's link options are kind of a mess spread between |
| |
| ccflags-y and cmd_vdsold. Collect linker directives into one |
| variable, VDSO_LDFLAGS, and use that in cmd_vdsold. |
| |
| Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> |
| Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> |
| Cc: Alexander Kochetkov <al.kochet@gmail.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| |
| --- |
| arch/arm/vdso/Makefile | 17 ++++++++++------- |
| 1 file changed, 10 insertions(+), 7 deletions(-) |
| |
| --- a/arch/arm/vdso/Makefile |
| +++ b/arch/arm/vdso/Makefile |
| @@ -6,9 +6,14 @@ obj-vdso := vgettimeofday.o datapage.o |
| targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds |
| obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) |
| |
| -ccflags-y := -shared -fPIC -fno-common -fno-builtin -fno-stack-protector |
| -ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 -DDISABLE_BRANCH_PROFILING |
| -ccflags-y += -Wl,--no-undefined $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) |
| +ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector |
| +ccflags-y += -DDISABLE_BRANCH_PROFILING |
| + |
| +VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 |
| +VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 |
| +VDSO_LDFLAGS += -nostdlib -shared |
| +VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) |
| +VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id) |
| |
| obj-$(CONFIG_VDSO) += vdso.o |
| extra-$(CONFIG_VDSO) += vdso.lds |
| @@ -40,10 +45,8 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE |
| |
| # Actual build commands |
| quiet_cmd_vdsold = VDSO $@ |
| - cmd_vdsold = $(CC) $(c_flags) -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) \ |
| - $(call cc-ldoption, -Wl$(comma)--build-id) \ |
| - -Wl,-Bsymbolic -Wl,-z,max-page-size=4096 \ |
| - -Wl,-z,common-page-size=4096 -o $@ |
| + cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \ |
| + -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@ |
| |
| quiet_cmd_vdsomunge = MUNGE $@ |
| cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@ |