-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-13308
-
ARMCLANG_4.0.1.LTS
-
-
default
-
Consider a "padding" section defined using a ". += <const>" expression, with a fill expression applied to it:
SECTIONS
{
GROUP {
.reserved:
(NOLOAD)
.padding: fill = 0xffffffff
.intvecs: {} palign(4)
.text: {} palign(4)
.rodata: {} palign(4)
.const: {} palign(4)
.cinit: {} palign(4)
} > P_MEM
...
}
Such a section is being marked as a RW data section and therefore treated as an uninitialized section.
Given the .padding section has no content of its own to definitively say whether it is initialized or uninitialized, it must rely on the context in which it is specified to determine whether it is initialized or not.
For the use case specified in the above linker command file snippet, if it has a fill operator applied to it, then the linker should treat it as an initialized output section.
Note that this issue was introduced by a fix to a previously reported linker issue. The issue has been verified using the tiarmclang 4.0.1.LTS compiler tools.