[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/24848] New: [Bug] When use -flto "weak symbol" are convert
From: |
akhilesh.k at samsung dot com |
Subject: |
[Bug binutils/24848] New: [Bug] When use -flto "weak symbol" are converted to "t". |
Date: |
Wed, 24 Jul 2019 15:49:34 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24848
Bug ID: 24848
Summary: [Bug] When use -flto "weak symbol" are converted to
"t".
Product: binutils
Version: 2.29
Status: NEW
Severity: critical
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: akhilesh.k at samsung dot com
Target Milestone: ---
when i use -flto "weak symbol" are converted to "t".
I really don't know whether this is bug or expected behavior, because in GCC
Source i am not able to find the code for this conversion.
@akhilesh-ubuntu:~/akhilesh/lto$ gcc -flto -o nornal myapp.c; nm -C ./nornal |
grep power
0000000000400532 t power
@akhilesh-ubuntu:~/akhilesh/lto$ gcc -o nornal myapp.c; nm -C ./nornal | grep
power
0000000000400532 W power
@akhilesh-ubuntu:~/akhilesh/lto$
================================================
@akhilesh-ubuntu:~/akhilesh/lto$ cat myapp.c
#include <stdio.h>
#include <stdlib.h>
int __attribute__((weak)) power(int x);
int power(int x)
{
return x*x;
}
int main(int argc, char **argv)
{
printf("power() = %d\n", power(atoi(argv[1])));
return 0;
}
=============================================================
@akhilesh-ubuntu:~/akhilesh/lto$
I am using gcc 8.3.0 version and binutils version is 2.29.1
@akhilesh-ubuntu:~/akhilesh/lto$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/8.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-arm-src-snapshot-8.3-2019.03/configure
--disable-multilib
Thread model: posix
gcc version 8.3.0 (Linaro GCC 8.2-2018.08~d
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/24848] New: [Bug] When use -flto "weak symbol" are converted to "t".,
akhilesh.k at samsung dot com <=