From 6fa433ba0ec6d81ab4b05485c7e4dc8646721152 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 17 Sep 2025 17:22:14 -0400 Subject: [PATCH] Resolves "couldn't find DT_PPC64_GLINK" bug (RHEL-68373) Resolves: RHEL-68373 --- ltrace-rhel68373.patch | 31 +++++++++++++++++++++++++++++++ ltrace.spec | 8 +++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 ltrace-rhel68373.patch diff --git a/ltrace-rhel68373.patch b/ltrace-rhel68373.patch new file mode 100644 index 0000000..4eb8c2a --- /dev/null +++ b/ltrace-rhel68373.patch @@ -0,0 +1,31 @@ +From 4da87819752101fb9665120641454448ebc95526 Mon Sep 17 00:00:00 2001 +From: DJ Delorie +Date: Wed, 17 Sep 2025 17:08:18 -0400 +Subject: ppc64le: fix couldn't find DT_PPC64_GLINK on /lib64/ld64.so.2 + +The loader is static and doesn't have a PLT so not finding +this there is not an issue, but it shows up in the dynamic +loader chain, so ignore this "error". + +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 66a842b..321eda3 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -520,13 +520,12 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + GElf_Addr glink_vma; + if (elf_load_dynamic_entry(lte, DT_PPC64_GLINK, + &glink_vma) < 0) { +- fprintf(stderr, "couldn't find DT_PPC64_GLINK\n"); +- return -1; ++ lte->arch.plt_stub_vma = 0; ++ } else { ++ /* The first glink stub starts at offset 32. */ ++ lte->arch.plt_stub_vma = glink_vma + 32; + } + +- /* The first glink stub starts at offset 32. */ +- lte->arch.plt_stub_vma = glink_vma + 32; +- + } else { + /* By exhaustion--PPC32 BSS. */ + if (elf_load_dynamic_entry(lte, DT_PLTGOT, diff --git a/ltrace.spec b/ltrace.spec index 1714d2e..d5f0426 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 52%{?dist} +Release: 53%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -134,6 +134,8 @@ Patch36: ltrace-0.7.91-ppc64le-scv.patch Patch37: ltrace-0.7.91-W-use-after-free.patch +Patch38: ltrace-rhel68373.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -183,6 +185,7 @@ execution of processes. %patch35 -p1 %patch36 -p1 %patch37 -p1 +%patch38 -p1 %build autoreconf -i @@ -210,6 +213,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Sep 17 2025 DJ Delorie - 0.7.91-53 +- Resolves "couldn't find DT_PPC64_GLINK" bug (RHEL-68373) + * Tue Oct 29 2024 Troy Dawson - 0.7.91-52 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018