Lines Matching refs:link

1 link-script$(sm) = $(ta-dev-kit-dir$(sm))/src/ta.ld.S
2 link-script-pp$(sm) = $(link-out-dir$(sm))/ta.lds
3 link-script-dep$(sm) = $(link-out-dir$(sm))/.ta.ld.d
19 all: $(link-out-dir$(sm))/$(user-ta-uuid).dmp \
20 $(link-out-dir$(sm))/$(user-ta-uuid).stripped.elf \
21 $(link-out-dir$(sm))/$(user-ta-uuid).ta
22 cleanfiles += $(link-out-dir$(sm))/$(user-ta-uuid).elf
23 cleanfiles += $(link-out-dir$(sm))/$(user-ta-uuid).dmp
24 cleanfiles += $(link-out-dir$(sm))/$(user-ta-uuid).map
25 cleanfiles += $(link-out-dir$(sm))/$(user-ta-uuid).stripped.elf
26 cleanfiles += $(link-out-dir$(sm))/$(user-ta-uuid).ta
27 cleanfiles += $(link-script-pp$(sm)) $(link-script-dep$(sm))
29 link-ldflags = -e__ta_entry -pie
30 link-ldflags += -T $(link-script-pp$(sm))
31 link-ldflags += -Map=$(link-out-dir$(sm))/$(user-ta-uuid).map
32 link-ldflags += --sort-section=alignment
33 link-ldflags += -z max-page-size=4096 # OP-TEE always uses 4K alignment
35 link-ldflags += $(call ld-option,-z force-bti) --fatal-warnings
37 link-ldflags += --as-needed # Do not add dependency on unused shlib
38 link-ldflags += $(link-ldflags$(sm))
40 $(link-out-dir$(sm))/dyn_list:
51 link-ldflags += --dynamic-list $(link-out-dir$(sm))/dyn_list
52 dynlistdep = $(link-out-dir$(sm))/dyn_list
53 cleanfiles += $(link-out-dir$(sm))/dyn_list
55 link-ldadd = $(user-ta-ldadd) $(addprefix -L,$(libdirs))
56 link-ldadd += --start-group
57 link-ldadd += $(addprefix -l,$(libnames))
59 link-ldflags += --eh-frame-hdr
60 link-ldadd += $(libstdc++$(sm)) $(libgcc_eh$(sm))
62 link-ldadd += --end-group
64 link-ldadd-after-libgcc += $(addprefix -l,$(libnames-after-libgcc))
66 ldargs-$(user-ta-uuid).elf := $(link-ldflags) $(objs) $(link-ldadd) \
67 $(libgcc$(sm)) $(link-ldadd-after-libgcc)
69 link-script-cppflags-$(sm) := \
72 $(addprefix -I,$(incdirs$(sm)) $(link-out-dir$(sm))) \
75 -include $(link-script-dep$(sm))
77 link-script-pp-makefiles$(sm) = $(filter-out %.d %.cmd,$(MAKEFILE_LIST))
79 define gen-link-t
80 $(link-script-pp$(sm)): $(link-script$(sm)) $(conf-file) $(link-script-pp-makefiles$(sm))
83 $(q)$(CPP$(sm)) -P -MT $$@ -MD -MF $(link-script-dep$(sm)) \
84 $(link-script-cppflags-$(sm)) $$< -o $$@
86 $(link-out-dir$(sm))/$(user-ta-uuid).elf: $(objs) $(libdeps) \
88 $(link-script-pp$(sm)) \
90 $(additional-link-deps)
94 $(link-out-dir$(sm))/$(user-ta-uuid).dmp: \
95 $(link-out-dir$(sm))/$(user-ta-uuid).elf
99 $(link-out-dir$(sm))/$(user-ta-uuid).stripped.elf: \
100 $(link-out-dir$(sm))/$(user-ta-uuid).elf
109 $(link-out-dir$(sm))/$(user-ta-uuid).ta: \
110 $(link-out-dir$(sm))/$(user-ta-uuid).stripped.elf \
119 $(eval $(call gen-link-t))
121 additional-link-deps :=