[PATCH v3 2/3] malloc: Remove LD_TRACE_PRELINKING usage from mtrace

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Aug 22 18:56:12 GMT 2022



On 22/08/22 06:48, Andreas Schwab wrote:
> This breaks cmake.
> 
> -- fixup_bundle: preparing...
> -- warning: cannot resolve item 'linux-vdso.so.1' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'linux-vdso.so.1' returning type 'other' -- possibly incorrect
> -- warning: cannot resolve item 'linux-vdso.so.1' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree?
> -- warning: cannot resolve item 'linux-vdso.so.1' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? -- warning: gp_resolved_file_type non-absolute file 'linux-vdso.so.1' returning type 'other' -- possibly incorrect
> -- warning: cannot resolve item 'linux-vdso.so.1' possible problems: need more directories? need to use InstallRequiredSystemLibraries? run in install tree instead of build tree? CMake Error at /home/abuild/rpmbuild/BUILD/cmake-3.24.1/Modules/BundleUtilities.cmake:471 (file): file READ_ELF given FILE "linux-vdso.so.1" that does not exist. Call Stack (most recent call first): /home/abuild/rpmbuild/BUILD/cmake-3.24.1/Modules/BundleUtilities.cmake:527 (get_item_rpaths) /home/abuild/rpmbuild/BUILD/cmake-3.24.1/Modules/BundleUtilities.cmake:614 (set_bundle_key_values) /home/abuild/rpmbuild/BUILD/cmake-3.24.1/Modules/BundleUtilities.cmake:934 (get_bundle_keys) bundleutils.cmake:37 (fixup_bundle)

It seems that cmake does rely on vdso to not have the '=>' as the default
shared objects.  Does the following help cmake?

It is also unfortunate because we have been asked to also remove this [1]


diff --git a/elf/rtld.c b/elf/rtld.c
index cbbaf4a331..7e3e410719 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2122,6 +2122,10 @@ dl_main (const ElfW(Phdr) *phdr,
            if (l->l_faked)
              /* The library was not found.  */
              _dl_printf ("\t%s => not found\n",  l->l_libname->name);
+           else if (strcmp (l->l_libname->name, l->l_name) == 0)
+             _dl_printf ("\t%s (0x%0*Zx)\n", l->l_libname->name,
+                         (int) sizeof l->l_map_start * 2,
+                         (size_t) l->l_map_start);
            else
              _dl_printf ("\t%s => %s (0x%0*Zx)\n",
                          DSO_FILENAME (l->l_libname->name),


[1] https://sourceware.org/pipermail/libc-help/2022-July/006225.html


More information about the Libc-alpha mailing list