[Bug lto/115953] New: --wrap does now work with lto
koule2333 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 16 10:09:55 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115953
Bug ID: 115953
Summary: --wrap does now work with lto
Product: gcc
Version: 12.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: koule2333 at gmail dot com
Target Milestone: ---
I am using gcc 12.3.1 and ld 2.41, and this error occurs again.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88643
my case:
int foo();
int __wrap_foo() {
return 6;
}
int main() {
return foo();
}
When I use 'gcc -flto ccc.c -Wl,--wrap=foo' to compile it, I got undefined
reference to `__wrap_foo'.
Can anyone tell me why?
More information about the Gcc-bugs
mailing list