diff options
author | Rui Ueyama <ruiu@google.com> | 2015-06-26 03:44:00 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-06-26 03:44:00 +0000 |
commit | 32f8e1cb4e1975f4bba05af655df79af00665f8d (patch) | |
tree | 1f3b658dd485843ab37ee8329d40862cc020666d /llvm/lib/Object/MachOObjectFile.cpp | |
parent | ccde19d77ec8e990bedeea2a7190beb3f42cce06 (diff) | |
download | llvm-32f8e1cb4e1975f4bba05af655df79af00665f8d.zip llvm-32f8e1cb4e1975f4bba05af655df79af00665f8d.tar.gz llvm-32f8e1cb4e1975f4bba05af655df79af00665f8d.tar.bz2 |
COFF: Change symbol resolution order for entry and /include.
We were resolving entry symbols and /include'd symbols after all other
symbols are resolved. But looks like it's too late. I found that it
causes some program to fail to link.
Let's say we have an object file A which defines symbols X and Y in an
archive. We also have another file B after A which defines X, Y and
_DLLMainCRTStartup in another archive. They conflict each other, so
either A or B can be linked.
If we have _DLLMainCRTStartup as an undefined symbol, file B is always
chosen. If not, there's a chance that A is chosen. If the linker
find it needs _DllMainCRTStartup after that, it's too late.
This patch adds undefined symbols to the symbol table as soon as
possible to fix the issue.
llvm-svn: 240757
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions