llvm-6502/lib
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 blockfreq: Implement Pass::releaseMemory() 2014-03-25 18:01:38 +00:00
AsmParser
Bitcode Support: Make error_category's constructor public 2014-03-15 04:05:59 +00:00
CodeGen Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +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-26 04:48:47 +00:00
IR Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +00:00
IRReader
LineEditor
Linker
LTO
MC DebugInfo: Add fission-related sections to COFF 2014-03-26 03:05:10 +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
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-26 04:48:47 +00:00
Transforms Prevent alias from pointing to weak aliases. 2014-03-26 04:48:47 +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