[lld] r229762 - PECOFF: Fix symbol aliases

Rui Ueyama ruiu at google.com
Wed Feb 18 15:50:23 PST 2015


On Wed, Feb 18, 2015 at 3:47 PM, Shankar Easwaran <shankare at codeaurora.org>
wrote:

> On 2/18/2015 5:11 PM, Rui Ueyama wrote:
>
>> +  alias->setOrdinal(target->ordinal() - 1);
>>
> Wouldn't this cause a wrap around when the ordinal of the first atom is 0 ?
>
>>   +// getNextOrdinal returns a monotonically increasaing uint64_t number
>> +// starting from 1. There's a large gap between two numbers returned
>> +// from this function, so that you can put other atoms between them.
>> +uint64_t FileCOFF::getNextOrdinal() {
>> +  return _ordinal++ << 32;
>> +}
>> +
>>
> Do you need it this to be shifted by 32 ? Wouldnt incrementing by 2 be
> enough ?


You could define two or more aliases to a symbol so we need more room than
for one alias. That doesn't work now, though.


>
>
> 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/20150218/cf9c0c79/attachment.html>


More information about the llvm-commits mailing list