Makefile (597473720f4dc69749542bfcfed4a927a43d935e) Makefile (29c623d64f0dcd6aa10e0eabd16233e77114090b)
1# SPDX-License-Identifier: GPL-2.0
2#
3# linux/arch/arm/boot/compressed/Makefile
4#
5# create a compressed vmlinuz image from the original vmlinux
6#
7
8OBJS =

--- 107 unchanged lines hidden (view full) ---

116CFLAGS_fdt_ro.o := $(nossp_flags)
117CFLAGS_fdt_rw.o := $(nossp_flags)
118CFLAGS_fdt_wip.o := $(nossp_flags)
119
120ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
121asflags-y := -DZIMAGE
122
123# Supply kernel BSS size to the decompressor via a linker symbol.
1# SPDX-License-Identifier: GPL-2.0
2#
3# linux/arch/arm/boot/compressed/Makefile
4#
5# create a compressed vmlinuz image from the original vmlinux
6#
7
8OBJS =

--- 107 unchanged lines hidden (view full) ---

116CFLAGS_fdt_ro.o := $(nossp_flags)
117CFLAGS_fdt_rw.o := $(nossp_flags)
118CFLAGS_fdt_wip.o := $(nossp_flags)
119
120ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
121asflags-y := -DZIMAGE
122
123# Supply kernel BSS size to the decompressor via a linker symbol.
124KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
124KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
125 sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
126 -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
127LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
128# Supply ZRELADDR to the decompressor via a linker symbol.
129ifneq ($(CONFIG_AUTO_ZRELADDR),y)
130LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
131endif
132ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)

--- 27 unchanged lines hidden (view full) ---

160# We need to prevent any GOTOFF relocs being used with references
161# to symbols in the .bss section since we cannot relocate them
162# independently from the rest at run time. This can be achieved by
163# ensuring that no private .bss symbols exist, as global symbols
164# always have a GOT entry which is what we need.
165# The .data section is already discarded by the linker script so no need
166# to bother about it here.
167check_for_bad_syms = \
125 sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
126 -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
127LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
128# Supply ZRELADDR to the decompressor via a linker symbol.
129ifneq ($(CONFIG_AUTO_ZRELADDR),y)
130LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
131endif
132ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)

--- 27 unchanged lines hidden (view full) ---

160# We need to prevent any GOTOFF relocs being used with references
161# to symbols in the .bss section since we cannot relocate them
162# independently from the rest at run time. This can be achieved by
163# ensuring that no private .bss symbols exist, as global symbols
164# always have a GOT entry which is what we need.
165# The .data section is already discarded by the linker script so no need
166# to bother about it here.
167check_for_bad_syms = \
168bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
168bad_syms=$$($(NM) $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
169[ -z "$$bad_syms" ] || \
170 ( echo "following symbols must have non local/private scope:" >&2; \
171 echo "$$bad_syms" >&2; false )
172
173check_for_multiple_zreladdr = \
174if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
175 echo 'multiple zreladdrs: $(ZRELADDR)'; \
176 echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \

--- 26 unchanged lines hidden ---
169[ -z "$$bad_syms" ] || \
170 ( echo "following symbols must have non local/private scope:" >&2; \
171 echo "$$bad_syms" >&2; false )
172
173check_for_multiple_zreladdr = \
174if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
175 echo 'multiple zreladdrs: $(ZRELADDR)'; \
176 echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \

--- 26 unchanged lines hidden ---