[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/24406] New: -Wl,--wrap= incompatible with -flto
From: |
dilyan.palauzov at aegee dot org |
Subject: |
[Bug ld/24406] New: -Wl,--wrap= incompatible with -flto |
Date: |
Mon, 01 Apr 2019 06:18:15 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24406
Bug ID: 24406
Summary: -Wl,--wrap= incompatible with -flto
Product: binutils
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
This is t.c:
------------
#include <stdio.h>
#include <unistd.h>
ssize_t __wrap_read(int fd, void *buffer, size_t count) {
printf("%s\n", (char*)buffer);
return fd + count;
}
int main() {
int i = read(1, "abc", 5);
printf("%i\n", i);
}
------------
I have gcc 8.3.1 20190311, ld.bfd 2.32.51.20190319, ld.gold 1.16
2.32.51.20190319 and clang 8.0.0.
This works
clang -flto -fuse-ld=gold -Wl,--wrap=read t.c
gcc -fuse-ld=bfd -Wl,--wrap=read t.c
gcc -fuse-ld=gold -Wl,--wrap=read t.c
clang -fuse-ld=bfd -Wl,--wrap=read t.c
clang -fuse-ld=gold -Wl,--wrap=read t.c
This fails
clang -flto -fuse-ld=bfd -Wl,--wrap=read t.c
gcc -flto -fuse-ld=gold -Wl,--wrap=read t.c
gcc -flto -fuse-ld=bfd -Wl,--wrap=read t.c
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/24406] New: -Wl,--wrap= incompatible with -flto,
dilyan.palauzov at aegee dot org <=
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, dilyan.palauzov at aegee dot org, 2019/04/02
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, dilyan.palauzov at aegee dot org, 2019/04/02
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, hjl.tools at gmail dot com, 2019/04/02
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, dilyan.palauzov at aegee dot org, 2019/04/03
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, dilyan.palauzov at aegee dot org, 2019/04/03
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, dilyan.palauzov at aegee dot org, 2019/04/03
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, cvs-commit at gcc dot gnu.org, 2019/04/25
- [Bug ld/24406] -Wl,--wrap= incompatible with -flto, hjl.tools at gmail dot com, 2019/04/25