mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
powerpc/build: vdso linker warning for orphan sections
Add --orphan-handlin for vdsos, and adjust vdso linker scripts to deal with orphan sections. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230609051002.3342-1-npiggin@gmail.com
This commit is contained in:
parent
b4bda59b47
commit
8ad57add77
@ -56,6 +56,8 @@ KCSAN_SANITIZE := n
|
||||
ccflags-y := -fno-common -fno-builtin
|
||||
ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack
|
||||
ldflags-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld)
|
||||
ldflags-$(CONFIG_LD_ORPHAN_WARN) += -Wl,--orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL)
|
||||
|
||||
# Filter flags that clang will warn are unused for linking
|
||||
ldflags-y += $(filter-out $(CC_AUTO_VAR_INIT_ZERO_ENABLER) $(CC_FLAGS_FTRACE) -Wa$(comma)%, $(KBUILD_CFLAGS))
|
||||
|
||||
|
@ -83,9 +83,11 @@ SECTIONS
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack)
|
||||
*(*.EMB.apuinfo)
|
||||
*(.branch_lt)
|
||||
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
||||
*(.bss .sbss .dynbss .dynsbss)
|
||||
*(.got1)
|
||||
*(.got1 .glink .iplt .rela*)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ SECTIONS
|
||||
. = ALIGN(16);
|
||||
.text : {
|
||||
*(.text .stub .text.* .gnu.linkonce.t.* __ftr_alt_*)
|
||||
*(.sfpr .glink)
|
||||
*(.sfpr)
|
||||
} :text
|
||||
PROVIDE(__etext = .);
|
||||
PROVIDE(_etext = .);
|
||||
@ -81,10 +81,12 @@ SECTIONS
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack)
|
||||
*(*.EMB.apuinfo)
|
||||
*(.branch_lt)
|
||||
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
||||
*(.bss .sbss .dynbss .dynsbss)
|
||||
*(.opd)
|
||||
*(.glink .iplt .plt .rela*)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user