Take the following example
reprod.c
int __thread a;
int b,c,k=100,n=400;
int my_start()
{
b = 500;
return a*a*b*k*n;
}
l.ld
ENTRY(my_start)
SECTIONS
{
.text (VMA_START) : AT(VMA_START + LMA_START)
{
*(.text.*)
}
. = ALIGN(16);
.data :
{
*(.data)
}
. = ALIGN(16);
Take the following examplereprod.cint __thread a;
int b,c,k=100,n=400;
int my_start()
{
b = 500;
return a*a*b*k*n;
}
l.ldENTRY(my_start)
SECTIONS
{
.text (VMA_START) : AT(VMA_START + LMA_START)
{
*(.text.*)
}
. = ALIGN(16);
.data :
{
*(.data)
}
. = ALIGN(16);
.tda
Hi Vijay, In the future, it helps if report bugs, or potential bugs, via the binutils bugzilla system. This allows us to track bugs individually and also add comments in the code that refer back to the bug report. https://sourceware.org/bugzilla/Thanks, will keep this in mind. clang
Raised bugzilla for the same :https://sourceware.org/bugzilla/show_bug.cgi?id=31540updated with suggested patch.Thank you.