Raised bugzilla for the same :https://sourceware.org/bugzilla/show_bug.cgi?id=31540updated with suggested patch.Thank you.
Hi Vijay,
but Im unsure about PT_TLS segment consisting only of .tbss section like in
above case.
Why ? It seems reasonable to me.
when objcopy does consider such a segment to be part of LOAD, when assigning
offsets things seem to be going wrong
First issue we encounter.
objcopy: stq0GB
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 reprod
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/
clang reprod.c -ffreestanding -c -o r
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
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);