Skip to contentSkip to conversation

arm64: vdso: Explicitly add build-id option

PATCH In review Laura Abbott 3 participants 5 messages May 15, 2019 – May 16, 2019 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: vdso: Explicitly add build-id option

Commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") switched to using LD explicitly. The --build-id option needs to be passed explicitly, similar to x86. Add this option.

Fixes 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
---
 arch/arm64/kernel/vdso/Makefile | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kernel/vdso/Makefile +1 -0
index 744b9dbaba03..ca209103cd06 100644
@@ -13,6 +13,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
+		$(call ld-option, --build-id) \
 		$(call ld-option, --hash-style=sysv) -n -T
 
 # Disable gcov profiling for VDSO code
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Laura Abbott

Commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") switched to using LD explicitly. The --build-id option needs to be passed explicitly, similar to x86. Add this option.

Fixes 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
---
 arch/arm64/kernel/vdso/Makefile | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kernel/vdso/Makefile +0 -0
index 744b9dbaba03..ca209103cd06 100644

arch/arm64/kernel/vdso/Makefile targets := $(obj-vdso) vdso.so vdso.so.dbg · line 19

Quoted 7 lines
arch/arm64/kernel/vdso/Makefile +1 -0
@@ -13,6 +13,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
+               $(call ld-option, --build-id) \
                $(call ld-option, --hash-style=sysv) -n -T
 
 # Disable gcov profiling for VDSO code

I missed that. Sorry.

You can add --build-id without $(call ld-option,...) because it is supported by our minimal version of toolchain.

See commit log of 1e0221374e for example.

Otherwise, looks good to me.

--
Best Regards

Masahiro Yamada

#2 lore raw
Quoted 28 lines · Masahiro Yamada
Quoted 16 lines · Laura Abbott

Commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") switched to using LD explicitly. The --build-id option needs to be passed explicitly, similar to x86. Add this option.

Fixes 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
---
 arch/arm64/kernel/vdso/Makefile | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kernel/vdso/Makefile +0 -0
index 744b9dbaba03..ca209103cd06 100644

arch/arm64/kernel/vdso/Makefile targets := $(obj-vdso) vdso.so vdso.so.dbg · line 19

Quoted 7 lines
arch/arm64/kernel/vdso/Makefile +1 -0
@@ -13,6 +13,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
+               $(call ld-option, --build-id) \
                $(call ld-option, --hash-style=sysv) -n -T
 
 # Disable gcov profiling for VDSO code

I missed that. Sorry.

Quoted 4 lines

You can add --build-id without $(call ld-option,...) because it is supported by our minimal version of toolchain.

See commit log of 1e0221374e for example.

Ok, so I'm ok folding in the diff below on top?

Will

--->8

arch/arm64/kernel/vdso/Makefile +2 -3
index ca209103cd06..fa230ff09aa1 100644
@@ -12,9 +12,8 @@ obj-vdso := gettimeofday.o note.o sigreturn.o
 targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
-ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
-		$(call ld-option, --build-id) \
-		$(call ld-option, --hash-style=sysv) -n -T
+ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
+		--build-id -n -T
 
 # Disable gcov profiling for VDSO code
 GCOV_PROFILE := n
#3 lore raw
Quoted 47 lines · Will Deacon
Quoted 28 lines · Masahiro Yamada
Quoted 16 lines · Laura Abbott

Commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") switched to using LD explicitly. The --build-id option needs to be passed explicitly, similar to x86. Add this option.

Fixes 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
---
  arch/arm64/kernel/vdso/Makefile | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/kernel/vdso/Makefile +0 -0
index 744b9dbaba03..ca209103cd06 100644

arch/arm64/kernel/vdso/Makefile targets := $(obj-vdso) vdso.so vdso.so.dbg · line 19

Quoted 7 lines
arch/arm64/kernel/vdso/Makefile +1 -0
@@ -13,6 +13,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg
  obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
  ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
+               $(call ld-option, --build-id) \
                 $(call ld-option, --hash-style=sysv) -n -T
 
  # Disable gcov profiling for VDSO code

I missed that. Sorry.

Quoted 4 lines

You can add --build-id without $(call ld-option,...) because it is supported by our minimal version of toolchain.

See commit log of 1e0221374e for example.

Ok, so I'm ok folding in the diff below on top?

Will

--->8

arch/arm64/kernel/vdso/Makefile +0 -0
index ca209103cd06..fa230ff09aa1 100644
@@ -12,9 +12,8 @@ obj-vdso := gettimeofday.o note.o sigreturn.o
  targets := $(obj-vdso) vdso.so vdso.so.dbg

arch/arm64/kernel/vdso/Makefile obj-vdso := gettimeofday.o note.o sigreturn.o · line 19

Quoted 10 lines
arch/arm64/kernel/vdso/Makefile +2 -3
  obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
-ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
-		$(call ld-option, --build-id) \
-		$(call ld-option, --hash-style=sysv) -n -T
+ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
+		--build-id -n -T
 
  # Disable gcov profiling for VDSO code
  GCOV_PROFILE := n

Looks good to me.

Thanks,
Laura

#4 lore raw
In reply to Will Deacon
Quoted 30 lines · Will Deacon
Quoted 28 lines · Masahiro Yamada
Quoted 16 lines · Laura Abbott

Commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") switched to using LD explicitly. The --build-id option needs to be passed explicitly, similar to x86. Add this option.

Fixes 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
---
 arch/arm64/kernel/vdso/Makefile | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kernel/vdso/Makefile +0 -0
index 744b9dbaba03..ca209103cd06 100644

arch/arm64/kernel/vdso/Makefile targets := $(obj-vdso) vdso.so vdso.so.dbg · line 19

Quoted 7 lines
arch/arm64/kernel/vdso/Makefile +1 -0
@@ -13,6 +13,7 @@ targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
 ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
+               $(call ld-option, --build-id) \
                $(call ld-option, --hash-style=sysv) -n -T
 
 # Disable gcov profiling for VDSO code

I missed that. Sorry.

Quoted 6 lines
Quoted 4 lines

You can add --build-id without $(call ld-option,...) because it is supported by our minimal version of toolchain.

See commit log of 1e0221374e for example.

Ok, so I'm ok folding in the diff below on top?

Looks good to me too.

Thanks.

Quoted 20 lines

Will

--->8

arch/arm64/kernel/vdso/Makefile +2 -3
index ca209103cd06..fa230ff09aa1 100644
@@ -12,9 +12,8 @@ obj-vdso := gettimeofday.o note.o sigreturn.o
 targets := $(obj-vdso) vdso.so vdso.so.dbg
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
-ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
-               $(call ld-option, --build-id) \
-               $(call ld-option, --hash-style=sysv) -n -T
+ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
+               --build-id -n -T
 
 # Disable gcov profiling for VDSO code
 GCOV_PROFILE := n
Signature · 2 lines
Best Regards
Masahiro Yamada