This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Free symbol buffers only if they are no longer in use
- From: Nick Clifton <nickc at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 17 Sep 2018 16:21:23 +0100
- Subject: Re: [PATCH] Free symbol buffers only if they are no longer in use
- References: <20180911203346.21955-1-hjl.tools@gmail.com> <87k1nrvk9f.fsf@igel.home> <CAMe9rOqg3T9vgd0KnoW4-+V5J-KhVoXVJp=w6gePAa9_uuGpVg@mail.gmail.com>
Hi H.J.
> PR binutils/23633
> * objcopy.c (strip_specific_buffer): New.
> (strip_unneeded_buffer): Likewise.
> (keep_specific_buffer): Likewise.
> (localize_specific_buffer): Likewise.
> (globalize_specific_buffer): Likewise.
> (keepglobal_specific_buffer): Likewise.
> (weaken_specific_buffer): Likewise.
> (add_specific_symbols): Add an argument to return pointer to
> allocated buffer. Don't free allocated buffer.
> (copy_main): Update add_specific_symbols to update pointers to
> allocated buffer. Free pointers to allocated buffer before
> return.
> * testsuite/binutils-all/objcopy.exp: Run pr23633.
> * testsuite/binutils-all/pr23633.d: New file.
> * testsuite/binutils-all/pr23633.list: Likewise.
> * testsuite/binutils-all/pr23633.s: Likewise.
Approved - please apply.
Cheers
Nick