Lines Matching +full:in +full:- +full:built
2 # SPDX-License-Identifier: GPL-2.0
7 # $(KBUILD_VMLINUX_MAIN) and $(KBUILD_VMLINUX_LIBS). Most are built-in.a files
8 # from top-level directories in the kernel tree, others are specified in
11 # which are linked conditionally (not within --whole-archive), and do not
17 # +-< $(KBUILD_VMLINUX_INIT)
18 # | +--< init/version.o + more
20 # +--< $(KBUILD_VMLINUX_MAIN)
21 # | +--< drivers/built-in.a mm/built-in.a + more
23 # +--< $(KBUILD_VMLINUX_LIBS)
24 # | +--< lib/lib.a + more
26 # +-< ${kallsymso} (see description in KALLSYMS section)
28 # vmlinux version (uname -v) cannot be updated during normal
29 # descending-into-subdirs phase since we do not yet know if we need to
36 set -e
38 # Nice output in kbuild format
39 # Will be supressed by "make -s"
43 printf " %-7s %s\n" ${1} ${2}
54 # built-in.a output file
58 info AR built-in.a
59 rm -f built-in.a;
60 ${AR} rcsTP${KBUILD_ARFLAGS} built-in.a \
71 objects="--whole-archive \
72 built-in.a \
73 --no-whole-archive \
74 --start-group \
76 --end-group"
78 ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${objects}
82 # ${1} - optional extra .o files
83 # ${2} - output file
90 objects="--whole-archive \
91 built-in.a \
92 --no-whole-archive \
93 --start-group \
95 --end-group \
98 ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} \
99 -T ${lds} ${objects}
101 objects="-Wl,--whole-archive \
102 built-in.a \
103 -Wl,--no-whole-archive \
104 -Wl,--start-group \
106 -Wl,--end-group \
109 ${CC} ${CFLAGS_vmlinux} -o ${2} \
110 -Wl,-T,${lds} \
112 -lutil -lrt -lpthread
113 rm -f linux
124 if [ -n "${CONFIG_KALLSYMS_ALL}" ]; then
125 kallsymopt="${kallsymopt} --all-symbols"
128 if [ -n "${CONFIG_KALLSYMS_ABSOLUTE_PERCPU}" ]; then
129 kallsymopt="${kallsymopt} --absolute-percpu"
132 if [ -n "${CONFIG_KALLSYMS_BASE_RELATIVE}" ]; then
133 kallsymopt="${kallsymopt} --base-relative"
141 ${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${afile}
142 ${CC} ${aflags} -c -o ${2} ${afile}
157 # Delete output files in case of error
160 rm -f .tmp_System.map
161 rm -f .tmp_kallsyms*
162 rm -f .tmp_vmlinux*
163 rm -f built-in.a
164 rm -f System.map
165 rm -f vmlinux
166 rm -f vmlinux.o
171 if [ $? -ne 0 ]; then
186 case "${KBUILD_VERBOSE}" in
188 set -x
198 case "${KCONFIG_CONFIG}" in
209 if [ -r .version ]; then
213 rm -f .version
218 ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
227 ${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
231 if [ -n "${CONFIG_KALLSYMS}" ]; then
247 # pass if that is the case. In theory it's possible this results
248 # in even more stubs, but unlikely.
268 size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" .tmp_kallsyms1.o)
269 size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" .tmp_kallsyms2.o)
271 if [ $size1 -ne $size2 ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then
284 if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
293 if [ -n "${CONFIG_KALLSYMS}" ]; then
296 if ! cmp -s System.map .tmp_System.map; then