[PATCH] D42516: [llvm-objcopy] Add support for large indexes

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 07:04:32 PST 2018


James Henderson via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> jhenderson added a comment.
>
> Ah, the joys of Prop74/Large ELFs.
>
> In https://reviews.llvm.org/D42516#987361, @jakehehrlich wrote:
>
>> As is there are a few problems but I didn't want to miss another day of review just because I didn't finish this today
>>
>> 1. There are no tests. This needs several tests. Recommendations on how to test this would be appreciated. I've been locally testing using an ELF I created that has 64k symbols and 128k sections but llvm-objcopy takes 5 seconds on that. I can work on optimizing that binary (smaller file, just the right amount of sections, etc...) but that still seems extreme. Additionally I think testing some combination of removal and such would be nice.
>
>
> I don't think 5 seconds is all that unreasonable, due to the size of the ELF, but it may be worth optimizing anyway. Maybe you could have a little python script that generates a YAML file for yaml2obj (assuming yaml2obj can handle very large ELFs).

I just timed test/ELF/many-sections.s which tests lld ability to handle
over SHN_LORESERVE sections:

llvm-mc 0.214696141 seconds
lld 0.170493547 seconds

So I agree that having a testcase and optimizing it is probably the best
thing to do.

Cheers,
Rafael


More information about the llvm-commits mailing list