Opened 7 years ago
Closed 7 years ago
#165 closed defect (fixed)
binutils spits .bss message
Reported by: | Silvan Scherrer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | dev tools |
Component: | *none | Version: | |
Severity: | medium | Keywords: | |
Cc: |
Description
latest binutils spits on some assembler files the following message
{standard input}:4280: Warning: ignoring fill value in section `.bss'
we believe the source of the problem might come from gcc.
Change History (13)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
For the time being we should just disable this message in gas with #ifdef 0
(and roll it back when we fix/update our gcc port) — this warning is purely informational and doing so is absolutely no harm.
This looks like the original patch that brought it to binutils: https://sourceware.org/ml/binutils/2015-12/txtN57RcPEOan.txt.
comment:4 by , 7 years ago
This is the respective GCC for OS/2 issue: https://github.com/psmedley/gcc/issues/27
comment:6 by , 7 years ago
Thanks Paul. If GCC 7.x is the same, then this will mean this .bss .align
thingy is OS/2 specific. Anyway, we will come to it later.
comment:9 by , 7 years ago
Yes, seems OS/2 specific, I see some stuff in emx.h that I think causes it, will comment further in the gcc ticket as it's more relevant there.
comment:10 by , 7 years ago
How do I get binutils 2.27 without compiling myself? is it in the exp repository?
comment:11 by , 7 years ago
yes it's there. but be aware there are 2 versions of it. 2.27-1 which has the .ss issue still and 2.27-2 which has the message disabled.
comment:12 by , 7 years ago
Thanks, confirmed the cause of the warning is a bird change to the definition of ASM_OUTPUT_ALIGN
comment:13 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
binutils with the fix released to rel
The source of the problem is the following assembly generated by gcc 4.9.2 on OS/2:
i.e. using align with a non-zero fill value (0xCC in our case) inside the .bss section of the data segment. In GCC for OS/2 this section is used to store uninitialised global variables of a C++ program which are initialised with zeroes at program startup (since they are all initialized with zeroes it makes no sense to store the actual bytes in the object file, only the length of the section is stored, and this is the main purpose of dedicating a special section for it). This way, setting the fill value to anything other than 0 (which is the default for .align) makes no sense and this is what the assembler warning is about.
This is a simple example to generate the above assembly (run with
gcc -S test.cpp
):This is its assembly:
Compile it with
as test.c
and you get the warning.Note that I don't know if the .bss section is stored in OMF as length only. But if our OMF natively supports such sections and gas maps to them (I guess it's the case), we should eliminate the fill value from
.align
. Otherwise we should stop using.bss
when generating assembly on OS/2 in -Zomf mode. A closer look at the compiler is needed to resolve this.