This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] malloc: Remove __malloc_initialize_hook from the API [BZ #19564]
- From: Florian Weimer <fweimer at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 24 May 2016 20:39:44 +0200
- Subject: Re: [PATCH] malloc: Remove __malloc_initialize_hook from the API [BZ #19564]
- Authentication-results: sourceware.org; auth=none
- References: <5c9da5b0-d548-0fa7-9264-c0fc5bd65039 at redhat dot com> <xnlh2z4bb8 dot fsf at greed dot delorie dot com>
On 05/24/2016 07:26 PM, DJ Delorie wrote:
Is there any way we could mark this in the ABI itself so that attempts
to link against obsolete hooks only work if you've selected an older
ABI, but fail with a suitable warning if you link against a new ABI?
I don't see how. The symbol is interposed from application code. This
means that the symbol won't have any linker magic attached to it. We
can't trigger on the existence of a symbol, either, I think, so tricks
with libc_nonshared.a aren't an option, either.
I'd love to do something less drastic here, but I just don't see any
other approach to remove the symbol from the API (but not the ABI).
The new malloc-hooks.h doesn't match the poison list in stdc-predef.h.
I assume that's "not yet" but the patch should be internally consistent.
Right, I'll make it consistent.