bug-binutils
[Top][All Lists]
Advanced

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

Re: Objcopy seems to consider tbss part of PTLOAD


From: Nick Clifton
Subject: Re: Objcopy seems to consider tbss part of PTLOAD
Date: Tue, 19 Mar 2024 11:59:17 +0000
User-agent: Mozilla Thunderbird

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 reprod.img

Which architecture is this for ?  Which versions of clang and
the binutils are you using ?

ld.lld --defsym VMA_START=0xffffffff80100000 --defsym LMA_START=0x4800000 -T 
l.ld reprod.img -o reprod.img
objcopy --change-section-lma .*-0xffffffff80000000 reprod.img
objcopy --adjust-start -0xffffffff80000000 reprod.img
lld dosen't seem to consider tbss section to have proper lma
of lld
   TLS            0x0000000000002058 0xffffffff80100060 (vma) 
0xffffffff80100060 (lma)
                  0x0000000000000000 0x0000000000000004  R      0x4
    03     .tbss
Ld Linker
   TLS            0x0000000000100098 0xffffffff801000a0 (vma) 
0xffffffffc81000a0 (lma)
                  0x0000000000000000 0x0000000000000004  R      0x4

I am sorry, but I did not understand what is wrong with the LMA.
Please could you explain some more.

Also, you say that objcopy does not consider the .tbss section
to be part of a PT_LOAD segment.  This is correct.  It is part
of a PT_TLS segment.  PT_TLS segments are considered to be
inherently loadable, so it is OK to use PT_TLS for thread local
data rather than PT_LOAD.

Cheers
  Nick




reply via email to

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