diff options
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/ELF/Symbols.cpp | 1 | ||||
| -rw-r--r-- | lld/test/ELF/Inputs/wrap.s | 4 | ||||
| -rw-r--r-- | lld/test/ELF/wrap.s | 6 |
3 files changed, 9 insertions, 2 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 203551c37a7..3ee15b77d2d 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -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; diff --git a/lld/test/ELF/Inputs/wrap.s b/lld/test/ELF/Inputs/wrap.s index 584e27033d5..a5be8e8c067 100644 --- a/lld/test/ELF/Inputs/wrap.s +++ b/lld/test/ELF/Inputs/wrap.s @@ -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 diff --git a/lld/test/ELF/wrap.s b/lld/test/ELF/wrap.s index 22eba309d6a..e327cb21b3d 100644 --- a/lld/test/ELF/wrap.s +++ b/lld/test/ELF/wrap.s @@ -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: |

