Handle binding in --wrap.
Copying the binding seems reasonable and matches the bfd behavior. llvm-svn: 319196
This commit is contained in:
parent
b338400188
commit
b45c164fc2
|
@ -141,7 +141,6 @@ void Symbol::copyFrom(Symbol *Other) {
|
|||
Symbol Sym = *this;
|
||||
memcpy(this, Other, sizeof(SymbolUnion));
|
||||
|
||||
Binding = Sym.Binding;
|
||||
VersionId = Sym.VersionId;
|
||||
Visibility = Sym.Visibility;
|
||||
IsUsedInRegularObj = Sym.IsUsedInRegularObj;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
.globl foo, __wrap_foo, __real_foo
|
||||
.global foo
|
||||
.weak __wrap_foo
|
||||
.global __real_foo
|
||||
foo = 0x11000
|
||||
__wrap_foo = 0x11010
|
||||
__real_foo = 0x11020
|
||||
|
|
|
@ -15,10 +15,16 @@
|
|||
// RUN: llvm-readobj -t %t3 | FileCheck -check-prefix=SYM %s
|
||||
// SYM: Name: foo
|
||||
// SYM-NEXT: Value: 0x11000
|
||||
// SYM-NEXT: Size:
|
||||
// SYM-NEXT: Binding: Global
|
||||
// SYM: Name: __wrap_foo
|
||||
// SYM-NEXT: Value: 0x11010
|
||||
// SYM-NEXT: Size:
|
||||
// SYM-NEXT: Binding: Weak
|
||||
// SYM: Name: __real_foo
|
||||
// SYM-NEXT: Value: 0x11020
|
||||
// SYM-NEXT: Size:
|
||||
// SYM-NEXT: Binding: Global
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
|
|
Loading…
Reference in New Issue