This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Issue a linker error if TLS sections are not adjacent
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 23 Jan 2014 14:25:10 +1030
- Subject: Re: [PATCH] Issue a linker error if TLS sections are not adjacent
- Authentication-results: sourceware.org; auth=none
- References: <20140122193013 dot GA4156 at intel dot com>
On Wed, Jan 22, 2014 at 11:30:13AM -0800, H.J. Lu wrote:
> PR ld/16498
> * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
> if TLS sections are not adjacent.
This part is OK.
> +SECTIONS
> +{
> + .tdata : { *(.tdata) }
> + .data : { *(.data)
> + }
> +}
On the other hand, the testcase is really showing a fault in orphan
section handling. If ld was a little more clever, it would put .tbss
after .tdata and your testcase would no longer give an error.
--
Alan Modra
Australia Development Lab, IBM