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.