This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Synthetic symbol leak in in elf_x86_64_get_synthetic_symtab and elf_read_minimal_symbols
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Alex Lindsay <alexlindsay239 at gmail dot com>, GDB <gdb-patches at sourceware dot org>
- Date: Fri, 11 Aug 2017 09:44:10 -0700
- Subject: Re: Synthetic symbol leak in in elf_x86_64_get_synthetic_symtab and elf_read_minimal_symbols
- Authentication-results: sourceware.org; auth=none
- References: <ce856f01-6e4b-5e74-fe8a-8e4aa0cb89e6@gmail.com> <20170811092709.GH8039@1170ee0b50d5> <CAMe9rOoG9JCky0uuoBe+_DUpVbGz3Ww2cBX1GSb1Nw5kByutaQ@mail.gmail.com> <20170811154542.GK8039@1170ee0b50d5>
On Fri, Aug 11, 2017 at 8:45 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> On 17-08-11 08:30:21, H.J. Lu wrote:
>> >
>> > We can only safely do this, but .name is leaked for x86_64. Other
>> > tools using bfd, like objdump, nm, and gprof may have this issue too.
>> > I'll ask binutils people on asymbol allocation and de-allocation.
>> >
>>
>> This is:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=21943
>>
>
> I opened it :)
>
>> i386 and x86-64 get_synthetic_symtab don't know if @plt should
>> be added to symbol name for a PLT entry. The first pass checks
>> if @plt is needed and extra space is allocated in the second pass.
>> We can assume @plt is needed and waste some space if it isn't.
>
> Do you plan to fix it?
>
Done.
--
H.J.