1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/ExecutionEngine
Rafael Espindola 5c8926deed Prevent alias from pointing to weak aliases.
This adds back r204781.

Original message:

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.

llvm-svn: 204934
2014-03-27 15:26:56 +00:00
..
IntelJITEvents Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
Interpreter [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:51:20 +00:00
JIT Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
MCJIT [MCJIT] Check if there have been errors during RuntimeDyld execution. 2014-03-26 18:19:27 +00:00
OProfileJIT Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
RuntimeDyld [MCJIT] Check if there have been errors during RuntimeDyld execution. 2014-03-26 18:19:27 +00:00
CMakeLists.txt
EventListenerCommon.h [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
ExecutionEngine.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:51:20 +00:00
ExecutionEngineBindings.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:51:20 +00:00
LLVMBuild.txt Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
Makefile
RTDyldMemoryManager.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
TargetSelect.cpp Clean up some usage of Triple. The base class has methods for determining if the target is iOS and Linux. 2013-08-29 20:23:14 +00:00