This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Does dladdr1 allocate heap memory?
- From: Florian Weimer <fweimer at redhat dot com>
- To: Ponnuvel Palaniyappan <pponnuvel at gmail dot com>, libc-help at sourceware dot org
- Date: Fri, 10 Nov 2017 22:07:13 +0100
- Subject: Re: Does dladdr1 allocate heap memory?
- Authentication-results: sourceware.org; auth=none
- References: <CAOL8xrXF7KD=w0O0i5YWKsbVWtw5dMQ3c1hM9FN4bQc2U06v8g@mail.gmail.com>
On 11/10/2017 07:52 PM, Ponnuvel Palaniyappan wrote:
Getting the struct link_map
is one of the steps and I am wondering
if I can make use of dladdr1 for that purpose.
I double-checked the situation, and dladdr1 will not call malloc in case
of an error, so you should be good.
(The code does not even install the ld.so exception handler, so it would
not be able to catch errors anyway.)
Florian