Skip to content

Commit d33ce23

Browse files
nlynch-mentorRussell King
authored andcommitted
ARM: 8385/1: VDSO: group link options
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>
1 parent 8d28128 commit d33ce23

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

arch/arm/vdso/Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ obj-vdso := vgettimeofday.o datapage.o
66
targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds
77
obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
88

9-
ccflags-y := -shared -fPIC -fno-common -fno-builtin -fno-stack-protector
10-
ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 -DDISABLE_BRANCH_PROFILING
11-
ccflags-y += -Wl,--no-undefined $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
9+
ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
10+
ccflags-y += -DDISABLE_BRANCH_PROFILING
11+
12+
VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
13+
VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
14+
VDSO_LDFLAGS += -nostdlib -shared
15+
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
16+
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
1217

1318
obj-$(CONFIG_VDSO) += vdso.o
1419
extra-$(CONFIG_VDSO) += vdso.lds
@@ -40,10 +45,8 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
4045

4146
# Actual build commands
4247
quiet_cmd_vdsold = VDSO $@
43-
cmd_vdsold = $(CC) $(c_flags) -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) \
44-
$(call cc-ldoption, -Wl$(comma)--build-id) \
45-
-Wl,-Bsymbolic -Wl,-z,max-page-size=4096 \
46-
-Wl,-z,common-page-size=4096 -o $@
48+
cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
49+
-Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
4750

4851
quiet_cmd_vdsomunge = MUNGE $@
4952
cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@

0 commit comments

Comments
 (0)