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

Rui Ueyama ruiu at google.com
Wed Mar 4 12:06:12 PST 2015


We don't need this behavior for non-ELF ports. Maybe we should document
that the symbols are ordered in outputs as they are resolved.

On Wed, Mar 4, 2015 at 11:38 AM, Shankar Easwaran <shankare at codeaurora.org>
wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150304/3d145ea8/attachment.html>


More information about the llvm-commits mailing list