llvm-6502/test
Rafael Espindola 33845aa8c4 Prevent alias from pointing to weak aliases.
Aliases are just another name for a position in a file. As such, the
regular symbol resolutions are not applied. For example, given

define void @my_func() {
  ret void
}
@my_alias = alias weak void ()* @my_func
@my_alias2 = alias void ()* @my_alias

We produce without this patch:

        .weak   my_alias
my_alias = my_func
        .globl  my_alias2
my_alias2 = my_alias

That is, in the resulting ELF file my_alias, my_func and my_alias are
just 3 names pointing to offset 0 of .text. That is *not* the
semantics of IR linking. For example, linking in a

@my_alias = alias void ()* @other_func

would require the strong my_alias to override the weak one and
my_alias2 would end up pointing to other_func.

There is no way to represent that with aliases being just another
name, so the best solution seems to be to just disallow it, converting
a miscompile into an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204781 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-26 04:48:47 +00:00
..
Analysis ScalarEvolution: Compute exit counts for loops with a power-of-2 step. 2014-03-25 16:25:12 +00:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +00:00
DebugInfo DebugInfo: Add fission-related sections to COFF 2014-03-26 03:05:10 +00:00
ExecutionEngine
Feature Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +00:00
FileCheck
Instrumentation [msan] Relax the test some more. 2014-03-25 14:32:05 +00:00
Integer
JitListener
Linker
LTO
MC Correctly detect if a symbol uses a reserved section index or not. 2014-03-26 00:16:43 +00:00
Object Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
Other
TableGen
tools Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
Transforms Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Refactor llvm/test/lit.cfg to use lit.util.which. 2014-03-21 17:31:35 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh