mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
3cb895c9300817fe7a7ff1f1890639ba50e73c37
__ImageBase is a special symbol whose value is the image base address. Previously, we handled __ImageBase symbol as an absolute symbol. Absolute symbols point to specific locations in memory and the locations never change even if an image is base-relocated. That means that we don't have base relocation entries for absolute symbols. This is not a case for __ImageBase. If an image is base-relocated, its base address changes, and __ImageBase needs to be shifted as well. So we have to have base relocations for __ImageBase. That means that __ImageBase is not really an absolute symbol but a different kind of symbol. In this patch, I introduced a new type of symbol -- DefinedRelative. DefinedRelative is similar to DefinedAbsolute, but it has not a VA but RVA and is a subject of base relocation. Currently only __ImageBase is of the new symbol type. llvm-svn: 243176
Languages
LLVM
41.5%
C++
31.7%
C
13%
Assembly
9.1%
MLIR
1.5%
Other
2.8%