aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-02-18 23:11:48 +0000
committerRui Ueyama <ruiu@google.com>2015-02-18 23:11:48 +0000
commit92b5979cb518667d29e1490debcbe81fe3d1cb38 (patch)
treeeab201af0d0bbcaa185efc584363767beca5f9c2 /llvm/lib/Object/IRObjectFile.cpp
parent1028dcb1d0965c3619a15bd266616cb07d552f11 (diff)
downloadllvm-92b5979cb518667d29e1490debcbe81fe3d1cb38.zip
llvm-92b5979cb518667d29e1490debcbe81fe3d1cb38.tar.gz
llvm-92b5979cb518667d29e1490debcbe81fe3d1cb38.tar.bz2
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
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions