1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test
Rafael Espindola d15cd32b9f Remove the linker_private and linker_private_weak linkages.
These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:

* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.

It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.

With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.

The objc uses are currently split in

* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.

The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are

* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.

Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.

For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).

llvm-svn: 203866
2014-03-13 23:18:37 +00:00
..
Analysis Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Assembler Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Bindings Fix the ocaml test to not create a alias to a declaration. 2014-03-12 21:20:42 +00:00
Bitcode Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll.py: Make it py3-compatible. [PR19112] 2014-03-13 00:10:37 +00:00
CodeGen Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
DebugInfo decl-derived-member.ll: Try to unbreak. Don't add -mtriple to %llc_dwarf. 2014-03-12 23:08:19 +00:00
ExecutionEngine Ignore old JIT tests in AARch64 - CMake style 2014-02-25 09:31:00 +00:00
Feature Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
FileCheck
Instrumentation [msan] Fix handling of byval arguments in VarArg calls. 2014-03-13 13:17:11 +00:00
Integer
JitListener
Linker Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
LTO Module: Don't rename in getOrInsertFunction() 2014-03-10 23:42:28 +00:00
MC Use printable names to implement directional labels. 2014-03-13 18:09:26 +00:00
Object Now that it is possible, use the mangler in IRObjectFile. 2014-02-28 02:17:23 +00:00
Other
TableGen
tools Support: add support to identify WinCOFF/ARM objects 2014-03-13 07:02:35 +00:00
Transforms Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
Unit With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Verifier Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] check-llvm: Include "bugpoint" in dependent list. 2014-03-04 16:13:30 +00:00
lit.cfg PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
lit.site.cfg.in
Makefile With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Makefile.tests
TestRunner.sh