[llvm-dev] [LLD] TLS tbss section discrepancy to gnu-ld

Fāng-ruì Sòng via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 4 19:54:03 PDT 2021


On Sun, Aug 1, 2021 at 2:15 AM Noah Hütter <noahhuetter at gmail.com> wrote:
>
> > The incorrect dot is related to ThreadBssOffset.
> >
> > When location counter was implemented (during
> > http://reviews.llvm.org/D18499 and rL282147 time), ThreadBssOffset was
> > added to support multiple tbss sections.
> >
> > This has limited support in ld.lld and isn't supported by GNU ld.
> >
> > I sent https://reviews.llvm.org/D107208 to make __tbss_end = .; work.
> >
> > Happy to back port it into 13.0.0
>
> That is exactly what solved my problem, thanks! Happy to see this in 13.0.0.
>
> @Joerg We (mis)use the TLS section for hardware threads in a cluster of
> RISCV cores that executes a statically linked binary. The TLS allocation
> is done by each hart at boot. The cluster doesn't have access to the ELF
> but copies (t)data to its local memory. We don't have a loader nor
> thread creation logic in that regard.
>

Fixed in main (https://reviews.llvm.org/D107208) and cherry picked
into release/13.x


More information about the llvm-dev mailing list