Commit graph

3 commits

Author SHA1 Message Date
Siddhesh Poyarekar 2d2d9f2b48 Move malloc hooks into a compat DSO
Remove all malloc hook uses from core malloc functions and move it
into a new library libc_malloc_debug.so.  With this, the hooks now no
longer have any effect on the core library.

libc_malloc_debug.so is a malloc interposer that needs to be preloaded
to get hooks functionality back so that the debugging features that
depend on the hooks, i.e. malloc-check, mcheck and mtrace work again.
Without the preloaded DSO these debugging features will be nops.
These features will be ported away from hooks in subsequent patches.

Similarly, legacy applications that need hooks functionality need to
preload libc_malloc_debug.so.

The symbols exported by libc_malloc_debug.so are maintained at exactly
the same version as libc.so.

Finally, static binaries will no longer be able to use malloc
debugging features since they cannot preload the debugging DSO.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-07-22 18:37:59 +05:30
Joseph Myers ba90e05052 Remove configuration name patterns from shlib-versions.
This patch removes the first column (patterns matching configuration
names) from shlib-versions, leaving shlib-versions entry selection
based purely on sysdeps directories.

An implication of this removal is that the default for any non-Linux
ports using NPTL will be the same SONAMEs for NPTL libraries as for
Linux (as those defaults, previously limited to .*-.*-linux.*, are
left in nptl/shlib-versions and nptl_db/shlib-versions).

Special host_os handling in configure.ac that was purely for
shlib-versions is removed.  (The host_os setting is still used for
libc-abis - see
<https://sourceware.org/ml/libc-alpha/2014-01/msg00375.html> regarding
that - but no entries there are affected by this change.)

Tested on x86_64 and x86 that the installed shared libraries are
unchanged by this patch.

	* scripts/soversions.awk: Do not handle configuration names.
	* Makeconfig ($(common-objpfx)soversions.i): Do not pass cpu,
	vendor and os variables to soversions.awk.
	* configure.ac: Do not modify gnu-* host_os.
	* configure: Regenerated
	* shlib-versions: Remove first column with configuration names.
	* nptl/shlib-versions: Likewise.
	* nptl_db/shlib-versions: Likewise.
	* sysdeps/hppa/shlib-versions: Likewise.
	* sysdeps/m68k/shlib-versions: Likewise.
	* sysdeps/mach/hurd/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/alpha/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/arm/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/hppa/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/ia64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/mips/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sh/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/tile/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.

libidn/ChangeLog:
	* shlib-versions: Remove first column with configuration names.
2014-09-12 12:28:47 +00:00
Joseph Myers dc932a24d9 Move architecture-specific shlib-versions entries to sysdeps files.
This patch eliminates another way in which ex-ports and non-ex-ports
architectures differ, by moving architecture-specific entries from the
top-level shlib-versions file and that in nptl/ to appropriate sysdeps
directories.  As with my previous patch
<https://sourceware.org/ml/libc-alpha/2014-06/msg00949.html>, I do not
change the regular expressions used; even where the present
expressions seem more general, I believe they are in fact specific to
the chosen sysdeps directory, because any port that matches the
expression but not the sysdeps directory does not currently exist, and
so would use different symbol versions if added in future (and an
intended goal of these changes is to eliminate the first column in
shlib-versions completely rather than having two different mechanisms
in use for system-specific configuration).

Tested on x86_64 that this does not change the installed shared
libraries.  (x86_64 of course does not provide much test coverage for
this patch - what should be architecture-specific contents in
shlib-versions for x86_64 is currently abi-*-ld-soname Makefile
settings, until gnu/lib-names.h is generated more like gnu/stubs.h so
those can move back to shlib-versions.)

	* nptl/shlib-versions: Remove architecture-specific entries.
	Moved to files in sysdeps.
	* shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: New
	file.
	* sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sh/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/shlib-versions: Likewise.
2014-09-12 12:22:27 +00:00