Skip to contentSkip to conversation

fix ia64 and tile for thin archives

PATCH Superseded Nicholas Piggin 2 participants 4 messages Jun 21, 2017 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover fix ia64 and tile for thin archives

These fixes are similar to the sh fix already in the kbuild/thin-ar tree.

Thanks,
Nick

Nicholas Piggin (2):
ia64: thin archives fix linking
tile: thin archives fix linking

 arch/ia64/Makefile             | 1 +
 arch/ia64/kernel/Makefile.gate | 3 ---
 arch/tile/Makefile             | 2 ++
 arch/tile/kernel/vdso/Makefile | 2 --
 4 files changed, 3 insertions(+), 5 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/2 ia64: thin archives fix linking

The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking them into the final link.

---
 arch/ia64/Makefile             | 1 +
 arch/ia64/kernel/Makefile.gate | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/ia64/Makefile +1 -0
index c100d780f1eb..302f7edbcfd1 100644
@@ -22,6 +22,7 @@ CHECKFLAGS	+= -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
 
 OBJCOPYFLAGS	:= --strip-all
 LDFLAGS_vmlinux	:= -static
+LDFLAGS_vmlinux	+= -R arch/ia64/kernel/gate-syms.o
 KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds
 KBUILD_AFLAGS_KERNEL := -mconstant-gp
 EXTRA		:diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate

index a32903ada016..9d9c69100d35 100644

arch/ia64/kernel/Makefile.gate +0 -3
@@ -14,9 +14,6 @@ GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
 	$(call if_changed,gate)
 
-$(obj)/built-in.o: $(obj)/gate-syms.o
-$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
-
 GATECFLAGS_gate-syms.o = -r
 $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE
 	$(call if_changed,gate)
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 tile: thin archives fix linking

In reply to Nicholas Piggin

The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking them into the final link.

---
 arch/tile/Makefile             | 2 ++
 arch/tile/kernel/vdso/Makefile | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/tile/Makefile +2 -0
index 4dc380a519d4..eb43ffb999b6 100644
@@ -30,6 +30,8 @@ endif
 # In kernel modules, this causes load failures due to unsupported relocations.
 KBUILD_CFLAGS   += -fno-asynchronous-unwind-tables
 
+LDFLAGS_vmlinux	+= -R arch/tile/kernel/vdso/vdso-syms.o
+
 LIBGCC_PATH     := \
   $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
 
arch/tile/kernel/vdso/Makefile +0 -2
index c54fff37b5ff..84daaf2c5e2c 100644
@@ -50,8 +50,6 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso)
 # table and layout of the linked DSO.  With ld -R we can then refer to
 # these symbols in the kernel code rather than hand-coded addresses.
 extra-y += vdso-syms.o
-$(obj)/built-in.o: $(obj)/vdso-syms.o
-$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
 
 SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
                             $(call cc-ldoption, -Wl$(comma)--hash-style=both)
Signature · 1 line
2.11.0
#3 lore raw
In reply to Nicholas Piggin

Hi Nicholas,

2017-06-21 16:56 GMT+09:00 Nicholas Piggin <[email protected]>:

Quoted 9 lines

These fixes are similar to the sh fix already in the kbuild/thin-ar tree.

Thanks,
Nick

Nicholas Piggin (2):
ia64: thin archives fix linking
tile: thin archives fix linking

I inserted these two after "sh: thin archives fix linking". Thanks!

Signature · 2 lines
Best Regards
Masahiro Yamada