• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# List of files in the vdso, has to be asm only for now
2
3obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
4
5# Build rules
6
7targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
8obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
9
10GCOV_PROFILE := n
11UBSAN_SANITIZE := n
12
13ccflags-y := -shared -fno-common -fno-builtin
14ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
15		$(call cc-ldoption, -Wl$(comma)--hash-style=both)
16asflags-y := -D__VDSO64__ -s
17
18obj-y += vdso64_wrapper.o
19extra-y += vdso64.lds
20CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
21
22# Force dependency (incbin is bad)
23$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
24
25# link rule for the .so file, .lds has to be first
26$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE
27	$(call if_changed,vdso64ld)
28
29# strip rule for the .so file
30$(obj)/%.so: OBJCOPYFLAGS := -S
31$(obj)/%.so: $(obj)/%.so.dbg FORCE
32	$(call if_changed,objcopy)
33
34# actual build commands
35quiet_cmd_vdso64ld = VDSO64L $@
36      cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
37
38# install commands for the unstripped file
39quiet_cmd_vdso_install = INSTALL $@
40      cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@
41
42vdso64.so: $(obj)/vdso64.so.dbg
43	@mkdir -p $(MODLIB)/vdso
44	$(call cmd,vdso_install)
45
46vdso_install: vdso64.so
47