Handle section vs global name conflict.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 28 Mar 2016 20:36:28 +0000 (20:36 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 28 Mar 2016 20:36:28 +0000 (20:36 +0000)
commita023f79db19dae6c42ce4240e85630510c20ac91
tree7f560eefe0cb296bd4d1313b0e77c054be60dca5
parentcc8ee8e3a226e160965dd586d22059bc3134337f
Handle section vs global name conflict.

This is a fix for PR26941.

When there is both a section and a global definition with the same
name, the global wins.

Section symbols are not added to the symbol table; section references
are left undefined and fixed up in the object writer unless they've
been satisfied by some other definition.

llvm-svn: 264649
llvm/include/llvm/MC/MCContext.h
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/MC/MCContext.cpp
llvm/test/MC/ELF/section-sym-err.s [deleted file]
llvm/test/MC/ELF/section-sym-redefine.s [new file with mode: 0644]