diff options
| author | Bill Wendling <isanbard@gmail.com> | 2010-06-29 21:24:00 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2010-06-29 21:24:00 +0000 |
| commit | f8b6137ea514c38511dbeedde9c02e27c937cad3 (patch) | |
| tree | 341cb2f4392d2d0af87f4cd7b694a87333c47cc7 /include/llvm/MC | |
| parent | fe9cd29675ecc34fe1b0308b26b36f389e0bccac (diff) | |
| download | external_llvm-f8b6137ea514c38511dbeedde9c02e27c937cad3.zip external_llvm-f8b6137ea514c38511dbeedde9c02e27c937cad3.tar.gz external_llvm-f8b6137ea514c38511dbeedde9c02e27c937cad3.tar.bz2 | |
Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
| -rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 8516de0..b76be03 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -85,6 +85,11 @@ namespace llvm { /// be passed through the assembler but be removed by the linker. This /// is "l" on Darwin, currently used for some ObjC metadata. const char *LinkerPrivateGlobalPrefix; // Defaults to "" + + /// LinkerWeakGlobalPrefix - This prefix is used for symbols that are marked + /// "weak" and should be passed through the assembler, but be removed by the + /// linker. This is "l" on Darwin, currently used for some ObjC metadata. + const char *LinkerWeakGlobalPrefix; // Defaults to "" /// InlineAsmStart/End - If these are nonempty, they contain a directive to /// emit before and after an inline assembly statement. @@ -335,6 +340,9 @@ namespace llvm { const char *getLinkerPrivateGlobalPrefix() const { return LinkerPrivateGlobalPrefix; } + const char *getLinkerWeakGlobalPrefix() const { + return LinkerWeakGlobalPrefix; + } const char *getInlineAsmStart() const { return InlineAsmStart; } |
