1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib
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
..
Analysis PR15967 Fix in basicaa for faulty returning no alias. 2014-03-26 21:30:19 +00:00
AsmParser Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
Bitcode All new elements except the last one initialized to NULL. Ideally, once parsing is complete, all elements should be non-NULL. 2014-03-27 12:08:23 +00:00
CodeGen Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
DebugInfo DebugInfo: Support debug_loc under fission 2014-03-25 01:44:02 +00:00
ExecutionEngine Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
IR Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
IRReader Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker [Layering] Sink Linker.h into a Linker subdirectory to make it 2014-03-06 03:42:23 +00:00
LTO Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
MC Move MCSymbolizer's constructor into header. It's trivial - there's no need for 2014-03-27 02:42:52 +00:00
Object [RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time. 2014-03-21 07:26:41 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
ProfileData InstrProf: Silence spurious warnings in GCC 4.8 2014-03-24 00:47:18 +00:00
Support Disable Visual C++ warning 4722 about aborting a destructor, 2014-03-25 08:42:49 +00:00
TableGen remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
Target Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
Transforms Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00