FWIW, the patch I am currently using is attached.

Bogdan

On Fri, Mar 22, 2019 at 11:38 AM Bogdan Harjoc <[email protected]> wrote:
>
> After building uclibc-1.0.31 with AddressSanitizer enabled (gcc7.3 and
> 8.2), asan complains at runtime that it's not the first library in the
> so-list.
>
> With a breakpoint on AsanCheckDynamicRTPrereqs which calls
> __dl_iterate_phdr, I see the first module that uClibc returns has
> info->libname = "/home/user/myapp", while on glibc-2.27, libname is an
> empty string. ASAN depends on seeing this empty string.
>
> Should __dl_iterate_phdr return an empty string here, or is there an
> alternative to get asan-enabled uClibc toolchains ?
>
> Thanks.
--- uClibc-ng-1.0.31/ldso/ldso/ldso.c	2019-03-22 11:45:09.767940921 +0200
+++ uClibc-ng-1.0.31/ldso/ldso/ldso.c	2019-03-22 11:45:14.309958978 +0200
@@ -712,7 +712,7 @@
 				continue;
 #endif
 			/* OK, we have what we need - slip this one into the list. */
-			app_tpnt = _dl_add_elf_hash_table(_dl_progname, app_tpnt->loadaddr,
+			app_tpnt = _dl_add_elf_hash_table("", app_tpnt->loadaddr,
 					app_tpnt->dynamic_info,
 					(unsigned long) DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr),
 					ppnt->p_filesz);
_______________________________________________
devel mailing list
[email protected]
https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel

Reply via email to