https://sourceware.org/bugzilla/show_bug.cgi?id=31956

Jonas Jelten <jj at stusta dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jj at stusta dot net

--- Comment #21 from Jonas Jelten <jj at stusta dot net> ---
I fear this is still present, I think due to
eb7892c4019bd5d00175c0eb80eb0c5a47a42ca1 and
3221c470f0765886a49a1a3d2ec602e4104a377b my testcase should work.

Tested on:
Gentoo: gcc 15.2.0 p5, ld.bfd 2.44-r1
Ubuntu 26.04dev: gcc 15.2.0-10ubuntu1 ld.bfd 2.45.50.20251201 

+++ lib.c +++
#include <stdio.h>

int lib() {
        printf("library function\n");
        return 0;
}

+++ main.c +++
#include <stdio.h>

int __real_lib();
int __wrap_lib() {
        printf("wrap lib\n");
        __real_lib();
        return 0;
}

int lib();

int main() {
        printf("running func\n");
        lib();
        return 0;
}


% gcc -Wl,--wrap=lib lib.c main.c -o prog && ./prog
running func
wrap lib
library function

% gcc -Wl,--wrap=lib -flto lib.c main.c -o prog && ./prog
running func
library function

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to