Skip to contentSkip to conversation

riscv: vdso: do not strip debugging info for vdso.so.dbg

PATCH Applied Changbin Du 4 participants 5 messages Jun 11, 2024 – Sep 17, 2024 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: vdso: do not strip debugging info for vdso.so.dbg

The vdso.so.dbg is a debug version of vdso and could be used for debugging purpose. For example, perf-annotate requires debugging info to show source lines. So let's keep its debugging info.

---
 arch/riscv/kernel/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vdso/Makefile +1 -1
index f7ef8ad9b550..960feb1526ca 100644
@@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
 # link rule for the .so file, .lds has to be first
 $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
 	$(call if_changed,vdsold)
-LDFLAGS_vdso.so.dbg = -shared -S -soname=linux-vdso.so.1 \
+LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \
 	--build-id=sha1 --hash-style=both --eh-frame-hdr
 
 # strip rule for the .so file
Signature · 1 line
2.34.1
author
#1 lore raw

Hello,
Is there any problem with this change? Ping~

Quoted 25 lines · Changbin Du

The vdso.so.dbg is a debug version of vdso and could be used for debugging purpose. For example, perf-annotate requires debugging info to show source lines. So let's keep its debugging info.

---
 arch/riscv/kernel/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vdso/Makefile +1 -1
index f7ef8ad9b550..960feb1526ca 100644
@@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
 # link rule for the .so file, .lds has to be first
 $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
 	$(call if_changed,vdsold)
-LDFLAGS_vdso.so.dbg = -shared -S -soname=linux-vdso.so.1 \
+LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \
 	--build-id=sha1 --hash-style=both --eh-frame-hdr
 
 # strip rule for the .so file
Signature · 1 line
2.34.1
Signature · 2 lines
Cheers,
Changbin Du
Reviewed-by
#2 lore raw
Quoted 9 lines · duchangbin

Hello,
Is there any problem with this change? Ping~

Quoted 5 lines · Changbin Du

The vdso.so.dbg is a debug version of vdso and could be used for debugging purpose. For example, perf-annotate requires debugging info to show source lines. So let's keep its debugging info.

Looks good to me

Quoted 21 lines
Quoted 20 lines
---
  arch/riscv/kernel/vdso/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vdso/Makefile +1 -1
index f7ef8ad9b550..960feb1526ca 100644
@@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
  # link rule for the .so file, .lds has to be first
  $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
  	$(call if_changed,vdsold)
-LDFLAGS_vdso.so.dbg = -shared -S -soname=linux-vdso.so.1 \
+LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \
  	--build-id=sha1 --hash-style=both --eh-frame-hdr
 
  # strip rule for the .so file
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#3 lore raw
In reply to Changbin Du

Hi Changbin,

Quoted 14 lines · Changbin Du

The vdso.so.dbg is a debug version of vdso and could be used for debugging purpose. For example, perf-annotate requires debugging info to show source lines. So let's keep its debugging info.

---
  arch/riscv/kernel/vdso/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/vdso/Makefile +0 -0
index f7ef8ad9b550..960feb1526ca 100644

arch/riscv/kernel/vdso/Makefile $(obj)/vdso.o: $(obj)/vdso.so · line 51

Quoted 8 lines
arch/riscv/kernel/vdso/Makefile +1 -1
@@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
  # link rule for the .so file, .lds has to be first
  $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
  	$(call if_changed,vdsold)
-LDFLAGS_vdso.so.dbg = -shared -S -soname=linux-vdso.so.1 \
+LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \
  	--build-id=sha1 --hash-style=both --eh-frame-hdr
 
  # strip rule for the .so file

Thanks,

Alex

#4 lore raw
In reply to Changbin Du
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Tue, 11 Jun 2024 12:09:47 +0800 you wrote:

The vdso.so.dbg is a debug version of vdso and could be used for debugging purpose. For example, perf-annotate requires debugging info to show source lines. So let's keep its debugging info.

---
 arch/riscv/kernel/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- riscv: vdso: do not strip debugging info for vdso.so.dbg

    https://git.kernel.org/riscv/c/7587a3602bf2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html