This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix TLS @dtpoff in unallocated sections


Jakub Jelinek <jakub@redhat.com> writes:

> Hi!
>
> The following patch changes @dtpoff handling in unallocated sections, so
> that it is never converted to @{n,}tpoff.
> On x86-64 if gdb wants to write 64-bit address, it has to use
> .long foo@dtpoff, 0
> ATM. AS PT_TLS segment size is limited to 4GB anyway, IMHO that's not that
> big trouble, but if you'd prefer to use
> .quad foo@dtpoff
> and R_X86_64_DTPOFF64 instead of *32, it is doable too (though would require
> a couple of tc-i386.c and elf64-x86-64.c changes, as e.g. lex_got is
> currently solely for 32-bit fields).

I think we can leave it.

>
> 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
>
> bfd/
> 	* elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
> 	to st_value + addend in non-alloced sections.
> 	* elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
> 	R_X86_64_DTPOFF32 to st_value + addend in non-alloced sections.
>
> ld/testsuite/
> 	* ld-i386/i386.exp: Add tlsg test.
> 	* ld-i386/tlsg.s: New test.
> 	* ld-i386/tlsg.sd: New test.
> 	* ld-i386/tlsbin.dd: Change LD into LD -> LE in comments.
> 	* ld-i386/tlsbinpic.s: Likewise.
> 	* ld-x86-64/x86-64.exp: Add tlsg test.
> 	* ld-x86-64/tlsg.s: New test.
> 	* ld-x86-64/tlsg.sd: New test.
> 	* ld-x86-64/tlsbin.dd: Change LD into LD -> LE in comments.
> 	* ld-x86-64/tlsbinpic.s: Likewise.

The x86-64 changes are fine.

Thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]