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

Noah Hütter via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 29 02:55:54 PDT 2021


Hi all,

When porting a project from using GNU-gcc to LLVM with LLD I encounter
this discrepancy in the `__tbss_end` symbol.

With an explicit linker script, the __tbss_end symbols has the same
value as __tbss_start:

.tbss :
{
  __tbss_start = .;
  *(.tbss .tbss.* .gnu.linkonce.tb.*)
  *(.tcommon)
  __tbss_end = .;
}

LD correctly assigns the end to __tbss_end. We need to determine the
size of the tbss section to initialize it on our bare-metal target.

What is the proper way to determine the tbss section size in LLD?

Noah

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210729/928a6d9d/attachment.sig>


More information about the llvm-dev mailing list