forked from OSchip/llvm-project
[MC] Copy visibility for .symver created symbols
This commit is contained in:
parent
8b6bea9bff
commit
e6c1777685
|
@ -1280,6 +1280,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,
|
|||
// This is the first place we are able to copy this information.
|
||||
Alias->setExternal(Symbol.isExternal());
|
||||
Alias->setBinding(Symbol.getBinding());
|
||||
Alias->setVisibility(Symbol.getVisibility());
|
||||
Alias->setOther(Symbol.getOther());
|
||||
|
||||
if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
|
||||
# RUN: llvm-readelf -s %t | FileCheck %s
|
||||
|
||||
# CHECK: NOTYPE GLOBAL HIDDEN {{[1-9]}} def@@v1
|
||||
# CHECK-NEXT: NOTYPE GLOBAL PROTECTED UND undef@v1
|
||||
|
||||
.protected undef
|
||||
.symver undef, undef@@@v1
|
||||
call undef
|
||||
|
||||
.globl def
|
||||
.hidden def
|
||||
.symver def, def@@@v1
|
||||
def:
|
Loading…
Reference in New Issue