[ELF] Move Symbol::needsTlsLd to config->needsTlsLd
authorFangrui Song <i@maskray.me>
Mon, 7 Feb 2022 18:26:16 +0000 (10:26 -0800)
committerFangrui Song <i@maskray.me>
Mon, 7 Feb 2022 18:26:16 +0000 (10:26 -0800)
commitcb03ac0b5d6f5c46d453762b2f6e234c24eabe1e
treefca04eef6704864176c68bc478930714441922f3
parent1049735d0739acf01ebf8f1208cb28efc0365658
[ELF] Move Symbol::needsTlsLd to config->needsTlsLd

to decrease sizeof(SymbolUnion) from 72 to 64 on ELF64 platforms.

Use a dummy `Undefined` to prevent null pointer dereference (though unused)
`*rel.sym` in InputSectionBase::relocateAlloc.

The relocation order may shuffle a bit, but otherwise there is no behavior
difference.
lld/ELF/Config.h
lld/ELF/Relocations.cpp
lld/ELF/Symbols.h
lld/test/ELF/i386-tls-dynamic.s
lld/test/ELF/ppc64-tls-missing-gdld.s