[ELF] Remove ctx indirection. NFC
authorFangrui Song <i@maskray.me>
Sat, 1 Oct 2022 19:06:33 +0000 (12:06 -0700)
committerFangrui Song <i@maskray.me>
Sat, 1 Oct 2022 19:06:33 +0000 (12:06 -0700)
commit34fa860048d042ff521f6e7e58ddd42718532232
tree04b803d47c6411080b89ab756f11e6e1bb52abcd
parenta623a4c8b4d5cc933ebc1856ce30aac935f62b18
[ELF] Remove ctx indirection. NFC

Add LLVM_LIBRARY_VISIBILITY to remove unneeded GOT and unique_ptr
indirection. We can move other global variables into ctx without
indirection concern. In the long term we may consider passing Ctx
as a parameter to various functions and eliminate global state as
much as possible and then remove `Ctx::reset`.
19 files changed:
lld/ELF/AArch64ErrataFix.cpp
lld/ELF/ARMErrataFix.cpp
lld/ELF/Arch/AMDGPU.cpp
lld/ELF/Arch/AVR.cpp
lld/ELF/Arch/Hexagon.cpp
lld/ELF/Arch/MipsArchTree.cpp
lld/ELF/Arch/PPC64.cpp
lld/ELF/Arch/RISCV.cpp
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/ICF.cpp
lld/ELF/InputFiles.cpp
lld/ELF/LTO.cpp
lld/ELF/MapFile.cpp
lld/ELF/MarkLive.cpp
lld/ELF/Relocations.cpp
lld/ELF/Symbols.cpp
lld/ELF/SyntheticSections.cpp
lld/ELF/Writer.cpp