[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/26662] New: nm minor case 'c' symbol type (when LTO activa
From: |
laurent.stacul at amadeus dot com |
Subject: |
[Bug binutils/26662] New: nm minor case 'c' symbol type (when LTO activated) |
Date: |
Thu, 24 Sep 2020 09:25:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26662
Bug ID: 26662
Summary: nm minor case 'c' symbol type (when LTO activated)
Product: binutils
Version: 2.35
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: laurent.stacul at amadeus dot com
Target Milestone: ---
Hello,
If I compile the following program (extracted from configure scripts)
$ cat conftest.c
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
void nm_test_func(void);
void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
int main(){nm_test_var='a';nm_test_func();return(0);}
And compile it with the following command:
$ gcc -c -DNDEBUG -O3 -flto -ffat-lto-objects -fuse-linker-plugin -std=gnu11
-fno-working-directory -ggdb3 conftest.c
Using the nm provided by Ubuntu 20.04 (GNU nm (GNU Binutils for Ubuntu) 2.34) I
have:
docker@e53efdc30d6e:~$ nm conftest.o
00000000 T main
00000000 T nm_test_func
00000000 C nm_test_var
Now if I use a recent nm (2.35), I get:
00000000 T main
00000000 T nm_test_func
00000000 c nm_test_var
Now it is minor case 'c' which I cannot find in the manpage.
Note that I tried to compile the program with several versions on GCC with the
same output in nm.
- gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
- gcc (GCC) 8.4.1 20200803
- gcc (GCC) 9.3.1 20200803
When I disable LTO,
$ gcc -c -DNDEBUG -O3 -fno-lto -fuse-linker-plugin -std=gnu11
-fno-working-directory -ggdb3 conftest.c
I have the same output with nm 2.34 and 2.35:
0000000000000001 C nm_test_var
For info, this leads to errors when you build libtoolized libraries (error at
configure step).
Regards,
Laurent
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/26662] New: nm minor case 'c' symbol type (when LTO activated),
laurent.stacul at amadeus dot com <=
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), thomas.barbier at gmail dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), nickc at redhat dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), hjl.tools at gmail dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), laurent.stacul at amadeus dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), laurent.stacul at amadeus dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), nickc at redhat dot com, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), cvs-commit at gcc dot gnu.org, 2020/09/24
- [Bug binutils/26662] nm minor case 'c' symbol type (when LTO activated), hjl.tools at gmail dot com, 2020/09/24