x86 ifunc related excessive memory use

H.J. Lu hjl.tools@gmail.com
Thu Jun 18 15:48:00 GMT 2009


On Thu, Jun 18, 2009 at 7:18 AM, Alan Modra<amodra@bigpond.net.au> wrote:
> On Thu, Jun 18, 2009 at 05:52:45AM -0700, H.J. Lu wrote:
>> On Thu, Jun 18, 2009 at 5:24 AM, Alan Modra<amodra@bigpond.net.au> wrote:
>> > HJ, since your ifunc patches I can't even run "make check" on my x86
>> > box successfully.
>> >
>> > tmpdir/dump53.o: could not read symbols: Memory exhausted
>> > FAIL: ld-elf/64ksec
>> >
>> > A quick look says it is likely to be the fact that you don't free
>> > isymbuf in check_relocs.
>> >
>>
>> I checked in this fix.
>
> Thanks, that's better.  Reading the syms for each section processed
> was a little excessive.  :)
>
> You might like to use bfd_sym_from_r_symndx instead of reading
> all the locals in check_relocs.  It's a small change I made as part
> of implementing ifunc support for powerpc.
>
> If you decide to stay with reading all the locals then you probably
> ought to get rid of bfd_sym_from_r_symndx in the x86 and x86_64
> check_relocs.

Using bfd_sym_from_r_symndx is a good idea. I will fix x86 after
you check in your patch.

BTW,  My ifunc glibc is at:

http://git.kernel.org/?p=devel/glibc/hjl/ifunc.git;a=summary

I am adding more IFUNC tests and pushing them upstream.

Thanks.

-- 
H.J.



More information about the Binutils mailing list