[ELF] -M/-Map: fix VMA/LMA/Size columns of symbol assignments when address/size>...
authorFangrui Song <maskray@google.com>
Sat, 4 Apr 2020 00:07:01 +0000 (17:07 -0700)
committerFangrui Song <maskray@google.com>
Tue, 7 Apr 2020 17:15:15 +0000 (10:15 -0700)
commit4e907e93fb42eff4ffc9a93026d1665de503acc9
tree7510e5fcbb603cd07d55a2dad5951ff6ea7ebd60
parent95eb50c4470894e4cebb08ba3ea97efe2f7c179a
[ELF] -M/-Map: fix VMA/LMA/Size columns of symbol assignments when address/size>=2**32

SymbolAssignment::addr stores the location counter. The type should be
uint64_t instead of unsigned. The upper half of the address space is
commonly used by operating system kernels.

Similarly, SymbolAssignment::size should be an uint64_t. A kernel linker
script can move the location counter from 0 to the upper half of the
address space.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D77445
lld/ELF/LinkerScript.h
lld/test/ELF/map-file-64bit.s [new file with mode: 0644]