Implement TLS relaxation from Global Dynamic model to Initial Exec
model.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2800 95820547-d848-0410-985e-9ae8fe0fa350
Add support for Initial Exec TLS model under amd64. (relaxation not
yet supported)

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2801 95820547-d848-0410-985e-9ae8fe0fa350
Create PT_TLS segment for output objects that define TLS variables.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2802 95820547-d848-0410-985e-9ae8fe0fa350
Add support for Local Exec TLS model under amd64.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2803 95820547-d848-0410-985e-9ae8fe0fa350
Add output section rules for ".data.rel.ro" section.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2804 95820547-d848-0410-985e-9ae8fe0fa350
Fix up section layout for SHT_NOBITS sections:
* SHT_NOBITS section should not consume file space.
* TLS SHT_NOBITS section (.tbss) should not consume file space or
  memory space since it will not be allocated in memory.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2805 95820547-d848-0410-985e-9ae8fe0fa350
Remove an wrong ". = ALIGN(64 / 8);" alignment in the text and data
segments boundary. We should just to put the data segment in the same
offset in the next page. The extraneous 8 bytes alignment sometimes
results in a misalignment between object file offset and memory offset
and causes troubles for the loader and runtime linker.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2806 95820547-d848-0410-985e-9ae8fe0fa350
Add support for TLS Local Dynamic model under amd64.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2807 95820547-d848-0410-985e-9ae8fe0fa350
Reserve 2 GOT entries instead of 1 for the R_X86_64_DTPMOD64
relocation assoicated with the Local Dynamic TLS model. (the second
entry, i.e., the "offset" will not be intialized by the runtime linker
and should always be 0)

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2808 95820547-d848-0410-985e-9ae8fe0fa350
Implement TLS relaxation from Local Dynamic to Local Exec model.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2809 95820547-d848-0410-985e-9ae8fe0fa350
Do not assume that every GOT entry will have a dynamic relocation.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2810 95820547-d848-0410-985e-9ae8fe0fa350
For now always create a R_X86_64_GLOB_DAT relocation for a GOT entry.
There are cases that the symbol's address is known at link time and
the GOT entry value can be filled in by the program linker instead.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2811 95820547-d848-0410-985e-9ae8fe0fa350
Always add symbols referenced by dynamic relocations to the dynamic
symbol table.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2812 95820547-d848-0410-985e-9ae8fe0fa350
Implement TLS relaxation from Global Dynamic to Local Exec model.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2813 95820547-d848-0410-985e-9ae8fe0fa350
Implement TLS relaxation from Initial Exec to Local Exec model.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2814 95820547-d848-0410-985e-9ae8fe0fa350
* Do not perform any TLS relaxation if the linker is creating a DSO.
* Relax Global Dynamic model to Initial Exec model if the linker is
  creating an executable and Local Exec model can not be used.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2815 95820547-d848-0410-985e-9ae8fe0fa350
When performing Global Dynamic to Initial Exec TLS relaxation:
* Use "addq" instead of "movq" for Initial Exec model instruction.
* The Instruction Pointer `p' should be added by 8 since the offset
  to apply the relocation is moved forward by 8 bytes.

git-svn-id: https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk@2816 95820547-d848-0410-985e-9ae8fe0fa350