[Bug binutils/25676] binutils can't handle the split/linked nature of the debug-records for variables whose (separate) extern-decl and definition are found in the same compilation unit

2020-03-21 Thread cialdi at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25676

--- Comment #4 from cialdi at gmail dot com ---
Created attachment 12392
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12392&action=edit
python script to test PR25676

python script to test PR25676

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


[Bug binutils/25676] binutils can't handle the split/linked nature of the debug-records for variables whose (separate) extern-decl and definition are found in the same compilation unit

2020-03-21 Thread cialdi at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25676

cialdi at gmail dot com changed:

   What|Removed |Added

 Resolution|FIXED   |WONTFIX

--- Comment #5 from cialdi at gmail dot com ---
Hi Nick,

I compiled binutils for both ARM and X86 and wrote a python script (attached)
to test the patch

The script creates a simple source file and compiles and links it using
different compilation and linking arguments. Verification is done for each
step. Between ARM and x86 there are no differences in behavior, so I report one
of two results:

OK example-O0-ffunction-sections-fdata-sections-fno-common.o
OK example-O0-ffunction-sections-fdata-sections-fno-common.elf
Fail example-O0-ffunction-sections-fdata-sections-fcommon.o
OK example-O0-ffunction-sections-fdata-sections-fcommon.elf
OK example-O0-ffunction-sections-fno-data-sections-fno-common.o
OK example-O0-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-O0-ffunction-sections-fno-data-sections-fcommon.o
OK example-O0-ffunction-sections-fno-data-sections-fcommon.elf
OK example-O0-fno-function-sections-fdata-sections-fno-common.o
OK example-O0-fno-function-sections-fdata-sections-fno-common.elf
Fail example-O0-fno-function-sections-fdata-sections-fcommon.o
OK example-O0-fno-function-sections-fdata-sections-fcommon.elf
OK example-O0-fno-function-sections-fno-data-sections-fno-common.o
OK example-O0-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-O0-fno-function-sections-fno-data-sections-fcommon.o
OK example-O0-fno-function-sections-fno-data-sections-fcommon.elf
OK example-O1-ffunction-sections-fdata-sections-fno-common.o
OK example-O1-ffunction-sections-fdata-sections-fno-common.elf
Fail example-O1-ffunction-sections-fdata-sections-fcommon.o
OK example-O1-ffunction-sections-fdata-sections-fcommon.elf
OK example-O1-ffunction-sections-fno-data-sections-fno-common.o
OK example-O1-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-O1-ffunction-sections-fno-data-sections-fcommon.o
OK example-O1-ffunction-sections-fno-data-sections-fcommon.elf
OK example-O1-fno-function-sections-fdata-sections-fno-common.o
OK example-O1-fno-function-sections-fdata-sections-fno-common.elf
Fail example-O1-fno-function-sections-fdata-sections-fcommon.o
OK example-O1-fno-function-sections-fdata-sections-fcommon.elf
OK example-O1-fno-function-sections-fno-data-sections-fno-common.o
OK example-O1-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-O1-fno-function-sections-fno-data-sections-fcommon.o
OK example-O1-fno-function-sections-fno-data-sections-fcommon.elf
OK example-O2-ffunction-sections-fdata-sections-fno-common.o
OK example-O2-ffunction-sections-fdata-sections-fno-common.elf
Fail example-O2-ffunction-sections-fdata-sections-fcommon.o
OK example-O2-ffunction-sections-fdata-sections-fcommon.elf
OK example-O2-ffunction-sections-fno-data-sections-fno-common.o
OK example-O2-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-O2-ffunction-sections-fno-data-sections-fcommon.o
OK example-O2-ffunction-sections-fno-data-sections-fcommon.elf
OK example-O2-fno-function-sections-fdata-sections-fno-common.o
OK example-O2-fno-function-sections-fdata-sections-fno-common.elf
Fail example-O2-fno-function-sections-fdata-sections-fcommon.o
OK example-O2-fno-function-sections-fdata-sections-fcommon.elf
OK example-O2-fno-function-sections-fno-data-sections-fno-common.o
OK example-O2-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-O2-fno-function-sections-fno-data-sections-fcommon.o
OK example-O2-fno-function-sections-fno-data-sections-fcommon.elf
OK example-O3-ffunction-sections-fdata-sections-fno-common.o
OK example-O3-ffunction-sections-fdata-sections-fno-common.elf
Fail example-O3-ffunction-sections-fdata-sections-fcommon.o
OK example-O3-ffunction-sections-fdata-sections-fcommon.elf
OK example-O3-ffunction-sections-fno-data-sections-fno-common.o
OK example-O3-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-O3-ffunction-sections-fno-data-sections-fcommon.o
OK example-O3-ffunction-sections-fno-data-sections-fcommon.elf
OK example-O3-fno-function-sections-fdata-sections-fno-common.o
OK example-O3-fno-function-sections-fdata-sections-fno-common.elf
Fail example-O3-fno-function-sections-fdata-sections-fcommon.o
OK example-O3-fno-function-sections-fdata-sections-fcommon.elf
OK example-O3-fno-function-sections-fno-data-sections-fno-common.o
OK example-O3-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-O3-fno-function-sections-fno-data-sections-fcommon.o
OK example-O3-fno-function-sections-fno-data-sections-fcommon.elf
OK example-Og-ffunction-sections-fdata-sections-fno-common.o
OK example-Og-ffunction-sections-fdata-sections-fno-common.elf
Fail example-Og-ffunction-sections-fdata-sections-fcommon.o
OK example-Og-ffunction-sections-fdata-se