[PATCH v2] ld/gold: Use mallinfo2 over mallinfo if available

Khem Raj raj.khem@gmail.com
Fri Mar 19 22:04:54 GMT 2021

On Fri, Mar 19, 2021 at 2:33 PM Cary Coutant <ccoutant@gmail.com> wrote:
> > mallinfo has been deprecated in recently glibc releases raising
> > deprecated-declarations when used, mallinfo2 has been introduced instead
> > which could be used ahead of mallinfo provided platform supports it
> Thanks. I've committed the following patch, based on the original one
> sent by Duncan Simpson.
> The deprecation warnings, while appreciated (I've encountered the
> overflow in the arena field quite often), seem premature, as my
> (fairly recent) debian distro still does not have mallinfo2() in
> glibc. I wouldn't suggest deprecating an old interface until the new
> one is widely available.
> 2021-03-19  Duncan Simpson <dr.duncan.p.simpson@gmail.com>
> gold/
>         PR gold/26585
>         * configure.ac: Add check for mallinfo2.
>         * configure: Regenerate.
>         * main.cc (main): Use mallinfo2 if available.
> -cary

gold/config.in needs to be regenerated as well.

More information about the Binutils mailing list