Introduce CommonSymbol.
authorRui Ueyama <ruiu@google.com>
Thu, 16 May 2019 03:29:03 +0000 (03:29 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 16 May 2019 03:29:03 +0000 (03:29 +0000)
commit5c073a94f9c25e73d78dbeb8eb7b1b3a60d7dd1f
tree5b4926869d3408f072134ca8ba057d4e1fc964a8
parentd5529629fb18ae184ef8db8358263031e19aeba9
Introduce CommonSymbol.

Previously, we handled common symbols as a kind of Defined symbol,
but what we were doing for common symbols is pretty different from
regular defined symbols.

Common symbol and defined symbol are probably as different as shared
symbol and defined symbols are different.

This patch introduces CommonSymbol to represent common symbols.
After symbols are resolved, they are converted to Defined symbols
residing in a .bss section.

Differential Revision: https://reviews.llvm.org/D61895

llvm-svn: 360841
lld/ELF/Driver.cpp
lld/ELF/InputFiles.cpp
lld/ELF/LinkerScript.cpp
lld/ELF/SymbolTable.cpp
lld/ELF/SymbolTable.h
lld/ELF/Symbols.cpp
lld/ELF/Symbols.h
lld/ELF/Writer.cpp