bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25676] binutils can't handle the split/linked nature of th


From: cialdi at gmail dot com
Subject: [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
Date: Sat, 21 Mar 2020 18:13:21 +0000

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-sections-fcommon.elf
OK example-Og-ffunction-sections-fno-data-sections-fno-common.o
OK example-Og-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-Og-ffunction-sections-fno-data-sections-fcommon.o
OK example-Og-ffunction-sections-fno-data-sections-fcommon.elf
OK example-Og-fno-function-sections-fdata-sections-fno-common.o
OK example-Og-fno-function-sections-fdata-sections-fno-common.elf
Fail example-Og-fno-function-sections-fdata-sections-fcommon.o
OK example-Og-fno-function-sections-fdata-sections-fcommon.elf
OK example-Og-fno-function-sections-fno-data-sections-fno-common.o
OK example-Og-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-Og-fno-function-sections-fno-data-sections-fcommon.o
OK example-Og-fno-function-sections-fno-data-sections-fcommon.elf
OK example-Os-ffunction-sections-fdata-sections-fno-common.o
OK example-Os-ffunction-sections-fdata-sections-fno-common.elf
Fail example-Os-ffunction-sections-fdata-sections-fcommon.o
OK example-Os-ffunction-sections-fdata-sections-fcommon.elf
OK example-Os-ffunction-sections-fno-data-sections-fno-common.o
OK example-Os-ffunction-sections-fno-data-sections-fno-common.elf
Fail example-Os-ffunction-sections-fno-data-sections-fcommon.o
OK example-Os-ffunction-sections-fno-data-sections-fcommon.elf
OK example-Os-fno-function-sections-fdata-sections-fno-common.o
OK example-Os-fno-function-sections-fdata-sections-fno-common.elf
Fail example-Os-fno-function-sections-fdata-sections-fcommon.o
OK example-Os-fno-function-sections-fdata-sections-fcommon.elf
OK example-Os-fno-function-sections-fno-data-sections-fno-common.o
OK example-Os-fno-function-sections-fno-data-sections-fno-common.elf
Fail example-Os-fno-function-sections-fno-data-sections-fcommon.o
OK example-Os-fno-function-sections-fno-data-sections-fcommon.elf


For object files compiled with -fcommon nm cannot "find" file name and line.
The strange thing (in my opinion) is that for the corresponding elf file it
does.
Since the information about files and lines that the elf has can be taken only
from the object file, I must assume that inside the object file there are those
info.

best regards
Max

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]