For -no-pie/-pie, when `__real_foo` is interposable in a shared object, `foo` is
exported. This rule does not match GNU ld and is unneeded because:
* the exported `foo` does not interpose `__real_foo` at run-time
* the similar `__wrap_foo` <-> `foo` relation does not have the rule
idx2 = idx1;
idx1 = idx3;
- if (real->exportDynamic)
- sym->exportDynamic = true;
if (!real->isUsedInRegularObj && sym->isUndefined())
sym->isUsedInRegularObj = false;
// RUN: llvm-readelf -s -x .got %t2 | FileCheck --check-prefix=READELF --implicit-check-not=__real_ %s
// CHECK2: <_start>:
-// CHECK2-NEXT: movq {{.*}}(%rip), %rax # 0x2022e8
-// CHECK2-NEXT: movq {{.*}}(%rip), %rbx # 0x2022e8
-// CHECK2-NEXT: movq {{.*}}(%rip), %rcx # 0x2022e0
+// CHECK2-NEXT: movq {{.*}}(%rip), %rax # 0x2022c0
+// CHECK2-NEXT: movq {{.*}}(%rip), %rbx # 0x2022c0
+// CHECK2-NEXT: movq {{.*}}(%rip), %rcx # 0x2022b8
.global _start
_start:
# RUN: llvm-readelf --dyn-syms %t2 | FileCheck %s --check-prefix=CHECK2
## See wrap-plt2.s why __wrap_foo is retained.
-# CHECK2: Symbol table '.dynsym' contains 4 entries:
+# CHECK2: Symbol table '.dynsym' contains 3 entries:
# CHECK2: NOTYPE LOCAL DEFAULT UND
# CHECK2-NEXT: NOTYPE GLOBAL DEFAULT UND bar
# CHECK2-NEXT: NOTYPE GLOBAL DEFAULT UND __wrap_foo
-# CHECK2-NEXT: NOTYPE GLOBAL DEFAULT 6 foo
## __wrap_bar is undefined.
# RUN: ld.lld -shared %t/main.o --wrap=bar -o %t3.so