[lld] r302107 - Fix accounting of tbss.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 12:34:36 PDT 2017


It can be zero, or 42, but it is not special in that. We are allowed to
completely drop the section table from executables.

Or did you mean something else?

Cheers,
Rafael

Rui Ueyama <ruiu at google.com> writes:

> Yes, but I'm talking about .tbss section address in an executable. It is
> not significant, so I think in theory it can be just zero. But we set some
> value, no?
>
> On Fri, May 5, 2017 at 6:04 AM, Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> Rui Ueyama <ruiu at google.com> writes:
>>
>> > Not directly related to this, but we have code that sets virtual
>> addresses
>> > to .tbss sections. Do you know why we are doing that? IIUC, virtual
>> > addresses of .tbss sections are not significant, so we can just set them
>> to
>> > zero.
>>
>> The entire section table on a DSO is not really significant. The only
>> part that is required is some way to get the symbol table, and only that
>> just for static linking.
>>
>> The table is mostly a human friendly info showing where a section
>> "is". The situation is fuzzy with NOBITS, but I think the customary is
>> to use the location they would have been had they not been NOBITS.
>>
>> Cheers,
>> Rafael
>>


More information about the llvm-commits mailing list