[PATCH] LLD: Core: Fix file ordinals of archive members.

Shankar Easwaran shankare at codeaurora.org
Wed Mar 4 11:38:03 PST 2015


On 3/4/2015 1:25 PM, Rui Ueyama wrote:
> On Wed, Mar 4, 2015 at 11:22 AM, Shankar Kalpathi Easwaran <
> shankarke at gmail.com> wrote:
>
>> ================
>> Comment at: lib/Core/Resolver.cpp:84
>> @@ -83,3 +83,3 @@
>>       if (const File *member = archiveFile->find(undefName,
>> dataSymbolOnly)) {
>> -      member->setOrdinal(_ctx.getNextOrdinalAndIncrement());
>> +      member->setOrdinal(archiveFile->ordinal() + _memberOrdinal++);
>>         const_cast<File *>(member)->beforeLink();
>> ----------------
>> The member ordinal seems wrong, it should be the next ordinal available
>> for GNU.
>
> Why do you think so?
As that is how the input files were picked by the resolver. If a 
different behavior is needed, may be add a linkingContext function to 
return the ordinal by passing a file ?

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list