Currently, LLD prints VA, but not LMA in a map file.
It seems can be useful to print both to reveal layout details
and patch implements it.
Note that gold also show LMA in a map file, but it is very limited,
for example:
.ddd 0x000000000000104c 0x101 load address 0x000000000000303c
0x000000000000104c 0x1 BYTE 0x11
0x000000000000114d . = (. + 0x100)
*fill* 0x000000000000104d 0x100
*(.ddd.*)
.text 0x0000000000001150 0x1 load address 0x0000000000003140
*(.text.*)
.text 0x0000000000001150 0x1 test.o
0x0000000000001150 _start
0x0000000000001150 f(int)I think we can do better and show more detailed info like this patch does.
One more thing I thought about was to hide LMA column if it is known there
is no difference with VA column. Then VA could be renamed to VA/LMA
I think I'm fine with showing LMA along with VMA, but my concern was that we would be showing too much information that's not easy to digest. I have one suggestion. We could stop printing out leading zeros for VMA and LMA to make it more concise. I.e. changing this line to
format("%*llx %*llx %*llx %5lld ", W, VA, W, LMA, W, Size, Align)