forked from Minki/linux
kbuild: add --hash-style= and --build-id unconditionally
As commit 1e0221374e
("mips: vdso: drop unnecessary cc-ldoption")
explained, these flags are supported by the minimal required version
of binutils. They are supported by ld.lld too.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
This commit is contained in:
parent
5ef872636c
commit
89ff7131f7
6
Makefile
6
Makefile
@ -900,10 +900,8 @@ KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
|
||||
KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
|
||||
KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)
|
||||
|
||||
# Use --build-id when available.
|
||||
LDFLAGS_BUILD_ID := $(call ld-option, --build-id)
|
||||
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
|
||||
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
|
||||
KBUILD_LDFLAGS_MODULE += --build-id
|
||||
LDFLAGS_vmlinux += --build-id
|
||||
|
||||
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
||||
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||
|
@ -13,8 +13,7 @@ ccflags-y += -DDISABLE_BRANCH_PROFILING
|
||||
ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
|
||||
ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
|
||||
-z max-page-size=4096 -nostdlib -shared $(ldflags-y) \
|
||||
$(call ld-option, --hash-style=sysv) \
|
||||
$(call ld-option, --build-id) \
|
||||
--hash-style=sysv --build-id \
|
||||
-T
|
||||
|
||||
obj-$(CONFIG_VDSO) += vdso.o
|
||||
|
@ -96,8 +96,8 @@ VDSO_LDFLAGS := $(VDSO_CPPFLAGS)
|
||||
VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
|
||||
VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
|
||||
VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--hash-style=sysv)
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--build-id)
|
||||
VDSO_LDFLAGS += -Wl,--hash-style=sysv
|
||||
VDSO_LDFLAGS += -Wl,--build-id
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd)
|
||||
|
||||
|
||||
|
@ -115,8 +115,7 @@ quiet_cmd_vdso = VDSO $@
|
||||
-T $(filter %.lds,$^) $(filter %.o,$^) && \
|
||||
sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@'
|
||||
|
||||
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
||||
$(call ld-option, --build-id) -Bsymbolic
|
||||
VDSO_LDFLAGS = -shared --hash-style=both --build-id -Bsymbolic
|
||||
GCOV_PROFILE := n
|
||||
|
||||
#
|
||||
|
@ -176,9 +176,8 @@ quiet_cmd_vdso = VDSO $@
|
||||
-T $(filter %.lds,$^) $(filter %.o,$^) && \
|
||||
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
|
||||
|
||||
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
||||
$(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \
|
||||
-Bsymbolic
|
||||
VDSO_LDFLAGS = -shared --hash-style=both --build-id \
|
||||
$(call ld-option, --eh-frame-hdr) -Bsymbolic
|
||||
GCOV_PROFILE := n
|
||||
|
||||
quiet_cmd_vdso_and_check = VDSO $@
|
||||
|
Loading…
Reference in New Issue
Block a user