I do not fully understand why we had these values in the tests, but
the new value matches what ld.bfd and ld.gold set, so I guess that
was just a mistake.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 4343 Build 4343: arc lint + arc unit
Event Timeline
Comment Actions
LGTM
lld/ELF/SyntheticSections.cpp | ||
---|---|---|
1399 | At least for non-mips part (gc-debuginfo-tls.s), this code does not look correct. ELF spec says: getSymVA, called inside Body->getVA() handled TLS specially: if (D.isTls() && !Config->Relocatable) { if (!Out::TlsPhdr) fatal(toString(D.File) + " has a STT_TLS symbol but doesn't have a PT_TLS section"); return VA - Out::TlsPhdr->p_vaddr; } The rest of logic looks almost similar to what happens for DefinedRegular inside getVA() called at line 1388. So I also feel that code doesn't make sense. |
At least for non-mips part (gc-debuginfo-tls.s), this code does not look correct.
ELF spec says:
"In dynamic executables and shared objects, the st_value field of a STT_TLS symbol contains the assigned TLS offset for defined symbols. "
That is not what we see in gc-debuginfo-tls.s before this patch. Mips part seems have similar issue.
getSymVA, called inside Body->getVA() handled TLS specially:
The rest of logic looks almost similar to what happens for DefinedRegular inside getVA() called at line 1388. So I also feel that code doesn't make sense.