]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
1da177e4 LT |
2 | |
3 | # List of files in the vdso, has to be asm only for now | |
4 | ||
18ad51dd AB |
5 | obj-vdso32-$(CONFIG_PPC64) = getcpu.o |
6 | obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o \ | |
7 | $(obj-vdso32-y) | |
1da177e4 LT |
8 | |
9 | # Build rules | |
10 | ||
a7f290da BH |
11 | ifeq ($(CONFIG_PPC32),y) |
12 | CROSS32CC := $(CC) | |
13 | endif | |
14 | ||
8150caad | 15 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg |
1da177e4 LT |
16 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) |
17 | ||
a15098c9 | 18 | GCOV_PROFILE := n |
bf76f73c | 19 | UBSAN_SANITIZE := n |
1da177e4 | 20 | |
4108d9ba | 21 | ccflags-y := -shared -fno-common -fno-builtin |
22 | ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ | |
787b393c | 23 | $(call cc-ldoption, -Wl$(comma)--hash-style=both) |
4108d9ba | 24 | asflags-y := -D__VDSO32__ -s |
1da177e4 LT |
25 | |
26 | obj-y += vdso32_wrapper.o | |
27 | extra-y += vdso32.lds | |
271c3f35 | 28 | CPPFLAGS_vdso32.lds += -P -C -Upowerpc |
1da177e4 LT |
29 | |
30 | # Force dependency (incbin is bad) | |
31 | $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so | |
32 | ||
33 | # link rule for the .so file, .lds has to be first | |
b9a4a0d0 | 34 | $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE |
1da177e4 LT |
35 | $(call if_changed,vdso32ld) |
36 | ||
8150caad RM |
37 | # strip rule for the .so file |
38 | $(obj)/%.so: OBJCOPYFLAGS := -S | |
39 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | |
40 | $(call if_changed,objcopy) | |
41 | ||
1da177e4 | 42 | # assembly rules for the .S files |
b9a4a0d0 | 43 | $(obj-vdso32): %.o: %.S FORCE |
1da177e4 LT |
44 | $(call if_changed_dep,vdso32as) |
45 | ||
46 | # actual build commands | |
47 | quiet_cmd_vdso32ld = VDSO32L $@ | |
b9a4a0d0 | 48 | cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) |
1da177e4 LT |
49 | quiet_cmd_vdso32as = VDSO32A $@ |
50 | cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< | |
51 | ||
8150caad RM |
52 | # install commands for the unstripped file |
53 | quiet_cmd_vdso_install = INSTALL $@ | |
54 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ | |
55 | ||
56 | vdso32.so: $(obj)/vdso32.so.dbg | |
57 | @mkdir -p $(MODLIB)/vdso | |
58 | $(call cmd,vdso_install) | |
59 | ||
60 | vdso_install: vdso32.so |