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

Cary Coutant ccoutant@gmail.com
Fri Mar 19 21:33:12 GMT 2021

> 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>

        PR gold/26585
        * configure.ac: Add check for mallinfo2.
        * configure: Regenerate.
        * main.cc (main): Use mallinfo2 if available.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mallinfo.patch
Type: application/octet-stream
Size: 1766 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210319/65022b78/attachment.obj>

More information about the Binutils mailing list