This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

enabling caching for dl_iterate_phdr()


Would it be possible to add two atomic counters, dl_load_additions and
dl_load_removals, which would get incremented whenever something is a
phdr is added to/removed from the list that is traversed by
dl_iterate_phdr()?

The motivation for this is that this would let me solve a
long-standing problem with libunwind where I'd like to cache
unwind-info, but cannot do so safely because there is no way for
libunwind to detect efficiently when a shared object may have gotten
unloaded.  Having both the "additions" and "removals" counters would
make it possible to cache both negative and positive information,
though I'd be quite happy if there was at least a "removals" counter.

Any opinions?  I guess the alternative that was mentioned in the past
was to use callbacks, but that seems very dangerous in regards to
deadlock etc.

	--david


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]