[PATCH v3 0/2] aarch64: Re-apply malloc ifuncs

Yury Khrustalev <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
This patch series re-applies commit 9ed3576e61f7a87eb83d512531566f5e5d6bb032
with some minor changes:

1) Split into two commits. Refactor declarations for malloc
   functions. Not functional change, just adding a new header
   and moving some code from malloc/malloc.c to it. Second
   commit actually adds malloc ifuncs.
2) Allow quick disabling of malloc ifuncs on aarch64 by changing
   the value of the USE_MULTIARCH_MALLOC macro from 1 to 0 in the
   sysdeps/aarch64/multiarch/malloc-ifuncs.h file.

Tested on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu and
build-tested for several targets with build-many-glibcs.py.

GDB issue has a fix. OK for trunk?

Two known issues of other tools that are triggered by malloc becoming
an ifunc:

1) GDB: https://sourceware.org/bugzilla/show_bug.cgi?id=34367
2) Valgrind: https://bugs.kde.org/show_bug.cgi?id=522497

The GDB issue has been addressed with this patch:
https://inbox.sourceware.org/gdb-patches/[email protected]/

Base commit: bb213471be

Changes since v2:
 - Rebase only.
 - https://inbox.sourceware.org/libc-alpha/[email protected]/

Changes since v1:
 - Rebase only.
 - https://inbox.sourceware.org/libc-alpha/[email protected]/

---

Yury Khrustalev (2):
  malloc: Refactor malloc API into a separate header
  malloc: aarch64: Add ifuncs for malloc functions

 malloc/malloc-internal.h                  |   2 +
 malloc/malloc.c                           | 159 +++-----------------
 sysdeps/aarch64/multiarch/Makefile        |   6 +
 sysdeps/aarch64/multiarch/malloc-ifuncs.c |  82 +++++++++++
 sysdeps/aarch64/multiarch/malloc-ifuncs.h |  25 ++++
 sysdeps/generic/malloc-api.h              | 172 ++++++++++++++++++++++
 sysdeps/generic/malloc-ifuncs.h           |  36 +++++
 7 files changed, 346 insertions(+), 136 deletions(-)
 create mode 100644 sysdeps/aarch64/multiarch/malloc-ifuncs.c
 create mode 100644 sysdeps/aarch64/multiarch/malloc-ifuncs.h
 create mode 100644 sysdeps/generic/malloc-api.h
 create mode 100644 sysdeps/generic/malloc-ifuncs.h

-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.