[PATCH] D34993: Hack to keep __real_foo

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 10:47:53 PDT 2017


ruiu added inline comments.


================
Comment at: test/ELF/wrap.s:23
+// SYM:      Name: __real_foo
+// SYM-NEXT: Value: 0x11020
 // SYM:      Name: __wrap_foo
----------------
jhenderson wrote:
> This doesn't look right to me at all. `__real_foo`, `__wrap_foo` and `foo` can't all have different values. Surely there should be only two different values between these three, because there are only two functions in the code?
`__wrap_foo` and `foo` should have the same value, but `__real_foo` shouldn't, because it should have a value of the original function instead of your wrapper function. So I think this is correct.


https://reviews.llvm.org/D34993





More information about the llvm-commits mailing list