This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Support -z initfirst for multiple shared libraries
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Kostya Serebryany <kcc at google dot com>
- Cc: d wk <dwksrc at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 29 Apr 2016 09:47:26 +0300
- Subject: Re: [PATCH] Support -z initfirst for multiple shared libraries
- Authentication-results: sourceware.org; auth=none
- References: <CAPESumqMqVem6VvaKXf_ko1zpM9_wOXixp1O7WGtS0RnvhMSpg at mail dot gmail dot com> <57206430 dot 9020206 at samsung dot com> <CAPESumqycYdiReUCUH51aLChaRLaTiGh121joQ_6rH7oRP+LAQ at mail dot gmail dot com> <5720F56E dot 6070704 at samsung dot com> <CAN=P9pjS1j480qBzy9xu9ZToyFA=xXgZmiLeFu_jkKDp3j87Rg at mail dot gmail dot com> <57224105 dot 3070301 at samsung dot com> <CAN=P9pgK4+fcFAUYEXpmRhr=V=UWhnLemu=yt407dh_nU=h_tA at mail dot gmail dot com>
On 04/29/2016 04:11 AM, Kostya Serebryany wrote:
I'm myself pretty sure that people would generally prefer to avoid
reimplementing parts of Glibc (symbol resolver in particular). Let's see
Kostya has something to say.
Hm? To say about what? :)
We almost never use asan as a DSO on Linux, so we don't get any problems
Just to clarify: you mean you don't ASan DSO dependencies (libc,
libpthread, librt, etc.) to be initialized before ASan initialization (i.e.
__asan_init) runs? In that case the OP's patch would work for ASan DSO.
No, I mean that we don't use asan.so, only asan.a, which calls __asan_init
from the pre-init array.
Right but preinit gets called prior to library ctors which means that
__asan_init indeed does not depend on libc initializers to be completed.