[ELF] - Reveal more information in -Map file about assignments.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Apr 2018 11:25:58 +0000 (11:25 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Apr 2018 11:25:58 +0000 (11:25 +0000)
commite88b76a98995c08806b1fdc7a6b43b96fa709c60
tree5e547fd06c97a679354f9904fd11aab8cdb21525
parentee01b1d390cce5c3bbd43c8b1999e0deecebda00
[ELF] - Reveal more information in -Map file about assignments.

Currently, LLD print symbol assignment commands to the map file,
but it does not do that for assignments that are outside of the section
descriptions. Such assignments can affect the layout though.

The patch implements the following:

* Teaches LLD to print symbol assignments outside of section declaration.
* Teaches LLD to print PROVIDE/HIDDEN/PROVIDE hidden commands.

In case when symbol is not provided, nothing will be printed.

Differential revision: https://reviews.llvm.org/D44894

llvm-svn: 329272
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/ELF/MapFile.cpp
lld/ELF/ScriptParser.cpp
lld/test/ELF/linkerscript/map-file.test
lld/test/ELF/linkerscript/map-file2.test