llvm-project/lld/lib
Rui Ueyama 92b5979cb5 PECOFF: Fix symbol aliases
Weak aliases defined using /alternatename command line option were getting
wrong RVAs in the final output because of wrong atom ordinal. Alias atoms
were assigned large ordinals than any other regular atoms because they were
instantiated after other atoms and just got new (larger) ordinals.

Atoms are sorted by its file and atom ordinals in the order pass. Alias
atoms were located after all other atoms in the same file.

An alias atom's ordinal needs to be smaller than its alias target but larger
than the atom appeared before the target -- so that the alias is located
between the two. Since an alias has no size, the alias target will be located
at the same location as the alias.

In this patch, I made a gap between two regular atoms so that we can put
aliases after instantiating them (without re-numbering existing atoms).

llvm-svn: 229762
2015-02-18 23:11:48 +00:00
..
Config add_lld_library -> add_llvm_library 2015-01-21 21:26:27 +00:00
Core [Core] Remove roundTripPass() function. 2015-02-06 04:15:02 +00:00
Driver PECOFF: Don't parse files in .drectve asynchronously. 2015-02-12 20:33:40 +00:00
Passes Remove unused parameter. 2015-02-11 23:22:34 +00:00
ReaderWriter PECOFF: Fix symbol aliases 2015-02-18 23:11:48 +00:00
CMakeLists.txt Revert "Add support library." 2014-11-11 00:40:36 +00:00
Makefile Revert "Add support library." 2014-11-11 00:40:36 +00:00