public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix PR12763, .tbss mishandling
@ 2011-05-20 15:37 Alan Modra
  2011-05-20 17:27 ` Hans-Peter Nilsson
  2011-05-23  5:30 ` Alan Modra
  0 siblings, 2 replies; 7+ messages in thread
From: Alan Modra @ 2011-05-20 15:37 UTC (permalink / raw)
  To: binutils

This patch fixes the primary complaint in PR12763, that ld reports
ld: pr12763: section `.tbss' can't be allocated in segment 1
by simply not checking .tbss.  The testcase is interesting for other
bugs it tickles too, most notably that a simple objcopy results in a
bogus PT_TLS header.  Also, I noticed that when you remove .tdata from
the testcase, ld creates a PT_LOAD header with zero p_filsiz and
p_memsz.

bfd/
	PR 12763
	* elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
	from PT_TLS header.
	(_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
	segment if just for .tbss.
	(assign_file_positions_for_load_sections): Don't report "can't
	allocate in segment" errors for .tbss.
	(assign_file_positions_for_non_load_sections): Don't set p_filesz
	from SHT_NOBITS section filepos.
ld/testsuite/
	PR 12763
	* ld-elf/tdata3.s: New test.
	* ld-elf/tbss3.s: New test.
	* ld-elf/binutils.exp: Consolidate tbss and tdata tests.

Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.536
diff -u -p -r1.536 elf.c
--- bfd/elf.c	12 May 2011 07:41:42 -0000	1.536
+++ bfd/elf.c	20 May 2011 15:18:32 -0000
@@ -976,7 +976,9 @@ _bfd_elf_make_section_from_shdr (bfd *ab
       phdr = elf_tdata (abfd)->phdr;
       for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)
 	{
-	  if (phdr->p_type == PT_LOAD
+	  if (((phdr->p_type == PT_LOAD
+		&& (hdr->sh_flags & SHF_TLS) == 0)
+	       || phdr->p_type == PT_TLS)
 	      && ELF_SECTION_IN_SEGMENT (hdr, phdr))
 	    {
 	      if ((flags & SEC_LOAD) == 0)
@@ -3987,8 +3989,12 @@ _bfd_elf_map_sections_to_segments (bfd *
 	  phdr_in_segment = FALSE;
 	}
 
-      /* Create a final PT_LOAD program segment.  */
-      if (last_hdr != NULL)
+      /* Create a final PT_LOAD program segment, but not if it's just
+	 for .tbss.  */
+      if (last_hdr != NULL
+	  && (i - phdr_index != 1
+	      || ((last_hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
+		  != SEC_THREAD_LOCAL)))
 	{
 	  m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
 	  if (m == NULL)
@@ -4748,7 +4754,8 @@ assign_file_positions_for_load_sections 
 
 	      sec = m->sections[i];
 	      this_hdr = &(elf_section_data(sec)->this_hdr);
-	      if (!ELF_SECTION_IN_SEGMENT_1 (this_hdr, p, check_vma, 0))
+	      if (!ELF_SECTION_IN_SEGMENT_1 (this_hdr, p, check_vma, 0)
+		  && !ELF_TBSS_SPECIAL (this_hdr, p))
 		{
 		  (*_bfd_error_handler)
 		    (_("%B: section `%A' can't be allocated in segment %d"),
@@ -4919,17 +4926,21 @@ assign_file_positions_for_non_load_secti
 	      && (p->p_type != PT_NOTE
 		  || bfd_get_format (abfd) != bfd_core))
 	    {
-	      Elf_Internal_Shdr *hdr;
-	      asection *sect;
-
 	      BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
 
-	      sect = m->sections[m->count - 1];
-	      hdr = &elf_section_data (sect)->this_hdr;
-	      p->p_filesz = sect->filepos - m->sections[0]->filepos;
-	      if (hdr->sh_type != SHT_NOBITS)
-		p->p_filesz += hdr->sh_size;
+	      p->p_filesz = 0;
 	      p->p_offset = m->sections[0]->filepos;
+	      for (i = m->count; i-- != 0;)
+		{
+		  asection *sect = m->sections[i];
+		  Elf_Internal_Shdr *hdr = &elf_section_data (sect)->this_hdr;
+		  if (hdr->sh_type != SHT_NOBITS)
+		    {
+		      p->p_filesz = (sect->filepos - m->sections[0]->filepos
+				     + hdr->sh_size);
+		      break;
+		    }
+		}
 	    }
 	}
       else if (m->includes_filehdr)
Index: ld/testsuite/ld-elf/binutils.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/binutils.exp,v
retrieving revision 1.13
diff -u -p -r1.13 binutils.exp
--- ld/testsuite/ld-elf/binutils.exp	18 Nov 2010 06:57:56 -0000	1.13
+++ ld/testsuite/ld-elf/binutils.exp	20 May 2011 15:20:11 -0000
@@ -121,35 +121,22 @@ if { ([istarget "i?86-*-elf*"]		
 
 binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma
 
+set tls_tests { "tdata1" "tdata2" "tdata3" }
 # hppa64 has its own .tbss section, with different flags.
 if { ![istarget "hppa64-*-*"] } {
-    binutils_test objcopy "" tbss1
-    binutils_test objcopy "-z relro" tbss1
-    binutils_test objcopy "-shared" tbss1
-    binutils_test objcopy "-shared -z relro" tbss1
-    binutils_test objcopy "-z max-page-size=0x100000" tbss1
-    binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss1
+    lappend tls_tests "tbss1" "tbss2" "tbss3"
 }
-
-binutils_test objcopy "" tdata1
-binutils_test objcopy "-z relro" tdata1
-binutils_test objcopy "-shared" tdata1
-binutils_test objcopy "-shared -z relro" tdata1
-binutils_test objcopy "-z max-page-size=0x100000" tdata1
-binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata1
-
-if { ![istarget "hppa64-*-*"] } {
-    binutils_test objcopy "" tbss2
-    binutils_test objcopy "-z relro" tbss2
-    binutils_test objcopy "-shared" tbss2
-    binutils_test objcopy "-shared -z relro" tbss2
-    binutils_test objcopy "-z max-page-size=0x100000" tbss2
-    binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss2
+set tls_opts {
+    ""
+    "-z relro"
+    "-shared"
+    "-shared -z relro"
+    "-z max-page-size=0x100000"
+    "-z max-page-size=0x100000 -z common-page-size=0x1000"
 }
 
-binutils_test objcopy "" tdata2
-binutils_test objcopy "-z relro" tdata2
-binutils_test objcopy "-shared" tdata2
-binutils_test objcopy "-shared -z relro" tdata2
-binutils_test objcopy "-z max-page-size=0x100000" tdata2
-binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata2
+foreach testitem $tls_tests {
+    foreach testopt $tls_opts {
+	binutils_test objcopy $testopt $testitem
+    }
+}
Index: ld/testsuite/ld-elf/tbss3.s
===================================================================
RCS file: ld/testsuite/ld-elf/tbss3.s
diff -N ld/testsuite/ld-elf/tbss3.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld/testsuite/ld-elf/tbss3.s	20 May 2011 15:20:11 -0000
@@ -0,0 +1,17 @@
+	.globl main
+	.globl start
+	.globl _start
+	.globl __start
+	.text
+main:
+start:
+_start:
+__start:
+	.byte 0
+
+	.section .tbss,"awT",%nobits
+	.p2align 10
+	.type	tbss, %object
+	.size	tbss, 1024
+tbss:
+	.zero	1024
Index: ld/testsuite/ld-elf/tdata3.s
===================================================================
RCS file: ld/testsuite/ld-elf/tdata3.s
diff -N ld/testsuite/ld-elf/tdata3.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld/testsuite/ld-elf/tdata3.s	20 May 2011 15:20:11 -0000
@@ -0,0 +1,23 @@
+	.globl main
+	.globl start
+	.globl _start
+	.globl __start
+	.text
+main:
+start:
+_start:
+__start:
+	.byte 0
+
+	.section .tdata,"awT",%progbits
+	.type	tdata,%object
+	.size	tdata,1
+tdata:
+	.byte 17
+
+	.section .tbss,"awT",%nobits
+	.p2align 10
+	.type	tbss, %object
+	.size	tbss, 1024
+tbss:
+	.zero	1024

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix PR12763, .tbss mishandling
  2011-05-20 15:37 Fix PR12763, .tbss mishandling Alan Modra
@ 2011-05-20 17:27 ` Hans-Peter Nilsson
  2011-05-21  1:49   ` Hans-Peter Nilsson
  2011-05-23  5:30 ` Alan Modra
  1 sibling, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-05-20 17:27 UTC (permalink / raw)
  To: amodra; +Cc: binutils

> Date: Sat, 21 May 2011 01:07:23 +0930
> From: Alan Modra <amodra@gmail.com>

> 	PR 12763
> 	* elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
> 	from PT_TLS header.
> 	(_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
> 	segment if just for .tbss.
> 	(assign_file_positions_for_load_sections): Don't report "can't
> 	allocate in segment" errors for .tbss.
> 	(assign_file_positions_for_non_load_sections): Don't set p_filesz
> 	from SHT_NOBITS section filepos.

This change caused, for cris-axis-elf and cris-axis-linux-gnu:

Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris/cris.exp ...
FAIL: ld-cris/tls-e-tpoffcomm1

The first different lines between ld-cris/tls-e-tpoffcomm1.d and
the linked output are:

regexp_diff match failure
regexp "^         filesz 0x0+a4 memsz 0x0+a4 flags r-x$"
line   "         filesz 0x00000084 memsz 0x00000084 flags r-x"
regexp_diff match failure
regexp "^    LOAD off    0x0+a4 vaddr 0x0+820a4 paddr 0x0+820a4 align 2\*\*13$"
line   "     TLS off    0x00000000 vaddr 0x00082084 paddr 0x00082084 align 2**2"
regexp_diff match failure
regexp "^         filesz 0x0+ memsz 0x0+ flags rw-$"
line   "         filesz 0x00000000 memsz 0x00000008 flags r--"
regexp_diff match failure
regexp "^     TLS off    0x0+a4 vaddr 0x0+820a4 paddr 0x0+820a4 align 2\*\*2$"
line   "private flags = 0:"
regexp_diff match failure
regexp "^         filesz 0x0+ memsz 0x0+8 flags r--$"
line   "Sections:"

On the surface the change seems benevolent, removing a LOAD of
an empty segment which had just the effect of filling up 32
bytes.

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix PR12763, .tbss mishandling
  2011-05-20 17:27 ` Hans-Peter Nilsson
@ 2011-05-21  1:49   ` Hans-Peter Nilsson
  0 siblings, 0 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-05-21  1:49 UTC (permalink / raw)
  To: binutils

> Date: Fri, 20 May 2011 19:26:46 +0200
> From: Hans-Peter Nilsson <hp@axis.com>
> > Date: Sat, 21 May 2011 01:07:23 +0930
> > From: Alan Modra <amodra@gmail.com>
> 
> > 	PR 12763

> This change caused, for cris-axis-elf and cris-axis-linux-gnu:
> 
> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris/cris.exp ...
> FAIL: ld-cris/tls-e-tpoffcomm1

And after a slightly closer inspection, the fix is as expected
to adjust for the removed empty program header, thus:

ld/testsuite:
	* ld-cris/tls-e-tpoffcomm1.d: Adjust for PR12763 change removing
	empty program header.

Committed.

Index: ld-cris/tls-e-tpoffcomm1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d,v
retrieving revision 1.1
diff -p -u -r1.1 tls-e-tpoffcomm1.d
--- ld-cris/tls-e-tpoffcomm1.d	25 Mar 2009 03:04:21 -0000	1.1
+++ ld-cris/tls-e-tpoffcomm1.d	21 May 2011 01:43:51 -0000
@@ -11,35 +11,33 @@
 
 Program Header:
     LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
-         filesz 0x0+a4 memsz 0x0+a4 flags r-x
-    LOAD off    0x0+a4 vaddr 0x0+820a4 paddr 0x0+820a4 align 2\*\*13
-         filesz 0x0+ memsz 0x0+ flags rw-
-     TLS off    0x0+a4 vaddr 0x0+820a4 paddr 0x0+820a4 align 2\*\*2
+         filesz 0x0+84 memsz 0x0+84 flags r-x
+     TLS off    0x0+ vaddr 0x0+82084 paddr 0x0+82084 align 2\*\*2
          filesz 0x0+ memsz 0x0+8 flags r--
 private flags = 0:
 
 Sections:
 Idx Name          Size      VMA       LMA       File off  Algn
-  0 .text         0+10  0+80094  0+80094  0+94  2\*\*1
+  0 .text         0+10  0+80074  0+80074  0+74  2\*\*1
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
-  1 .tbss         0+8  0+820a4  0+820a4  0+a4  2\*\*2
+  1 .tbss         0+8  0+82084  0+82084  0+  2\*\*2
                   ALLOC, THREAD_LOCAL
 SYMBOL TABLE:
-0+80094 l    d  .text	0+ .text
-0+820a4 l    d  .tbss	0+ .tbss
-0+80098 l     F .text	0+c do_test
-0+80094 g       .text	0+ _start
-0+820a4 g       \*ABS\*	0+ __bss_start
+0+80074 l    d  .text	0+ .text
+0+82084 l    d  .tbss	0+ .tbss
+0+80078 l     F .text	0+c do_test
+0+80074 g       .text	0+ _start
+0+82084 g       \*ABS\*	0+ __bss_start
 0+ g       .tbss	0+4 foo
-0+820a4 g       \*ABS\*	0+ _edata
-0+820c0 g       \*ABS\*	0+ _end
+0+82084 g       \*ABS\*	0+ _edata
+0+820a0 g       \*ABS\*	0+ _end
 0+4 g       .tbss	0+4 bar
 #...
 Disassembly of section .text:
 
-00080094 <_start>:
-   80094:	41b2                	moveq 1,\$r11
+00080074 <_start>:
+   80074:	41b2                	moveq 1,\$r11
 #...
-00080098 <do_test>:
-   80098:	2f0e f8ff ffff      	add.d 0xfffffff8,\$r0
-   8009e:	2f1e fcff ffff      	add.d 0xfffffffc,\$r1
+00080078 <do_test>:
+   80078:	2f0e f8ff ffff      	add.d 0xfffffff8,\$r0
+   8007e:	2f1e fcff ffff      	add.d 0xfffffffc,\$r1

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix PR12763, .tbss mishandling
  2011-05-20 15:37 Fix PR12763, .tbss mishandling Alan Modra
  2011-05-20 17:27 ` Hans-Peter Nilsson
@ 2011-05-23  5:30 ` Alan Modra
  2011-05-23  5:41   ` Alan Modra
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Modra @ 2011-05-23  5:30 UTC (permalink / raw)
  To: binutils

This fixes some fallout from my previous PR12763 patch.
hppa64-linux  +ERROR: /src/binutils-current/ld/testsuite/ld-elf/tdata3.s: assembly failed
The tdata3 test uses .tbss as well as .tdata.

ld/testsuite/
	* ld-elf/binutils.exp: Don't run tdata3 for hppa64.

Index: ld/testsuite/ld-elf/binutils.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/binutils.exp,v
retrieving revision 1.14
diff -u -p -r1.14 binutils.exp
--- ld/testsuite/ld-elf/binutils.exp	20 May 2011 15:33:29 -0000	1.14
+++ ld/testsuite/ld-elf/binutils.exp	23 May 2011 01:16:22 -0000
@@ -121,10 +121,10 @@ if { ([istarget "i?86-*-elf*"]		
 
 binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma
 
-set tls_tests { "tdata1" "tdata2" "tdata3" }
+set tls_tests { "tdata1" "tdata2" }
 # hppa64 has its own .tbss section, with different flags.
 if { ![istarget "hppa64-*-*"] } {
-    lappend tls_tests "tbss1" "tbss2" "tbss3"
+    lappend tls_tests "tdata3" "tbss1" "tbss2" "tbss3"
 }
 set tls_opts {
     ""

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix PR12763, .tbss mishandling
  2011-05-23  5:30 ` Alan Modra
@ 2011-05-23  5:41   ` Alan Modra
  2011-05-24  0:07     ` Fix cris-* fallout from " Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2011-05-23  5:41 UTC (permalink / raw)
  To: binutils

This fixes further fallout.

i370-linux  +FAIL: objcopy  (tbss1)
i370-linux  +FAIL: objcopy -z relro (tbss1)
i370-linux  +FAIL: objcopy -z max-page-size=0x100000 (tbss1)
i370-linux  +FAIL: objcopy -z max-page-size=0x100000 -z common-page-size=0x1000 (tbss1)

These failures are due to this target using its own scripts that lack
mention of .tdata/.bss rather than using elf.sc, which exposed bugs in
orphan .tbss handling.  While looking at this, I noticed that
lang_output_section_find_by_flags had the curious property that an
orphan .sdata2 like section wouldn't be placed after .sdata2, and
similarly for orphan TLS sections.

bfd/
	PR 12763
	* elf.c (assign_file_positions_for_load_sections): Set sh_offset for
	.tbss, and page align same for all SHT_NOBITS sections.
ld/
	PR 12763
	* ldlang.c (lang_output_section_find_by_flags): Match orphan .sdata2
	like sections to existing .sdata2, and similarly for orphan TLS
	sections.
	* emultempl/elf32.em (place_orphan): Exclude .tbss from orphan_bss.

Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.537
diff -u -p -r1.537 elf.c
--- bfd/elf.c	20 May 2011 15:32:24 -0000	1.537
+++ bfd/elf.c	23 May 2011 01:15:28 -0000
@@ -4684,11 +4684,24 @@ assign_file_positions_for_load_sections 
 	    }
 	  else
 	    {
-	      if (p->p_type == PT_LOAD)
+	      if (p->p_type == PT_LOAD
+		  || (this_hdr->sh_type == SHT_NOBITS
+		      && (this_hdr->sh_flags & SHF_TLS) != 0
+		      && this_hdr->sh_offset == 0))
 		{
-		  this_hdr->sh_offset = sec->filepos = off;
-		  if (this_hdr->sh_type != SHT_NOBITS)
-		    off += this_hdr->sh_size;
+		  if (this_hdr->sh_type == SHT_NOBITS)
+		    {
+		      /* These sections don't really need sh_offset,
+			 but give them one anyway.  */
+		      bfd_vma adjust = vma_page_aligned_bias (this_hdr->sh_addr,
+							      off, align);
+		      this_hdr->sh_offset = sec->filepos = off + adjust;
+		    }
+		  else
+		    {
+		      this_hdr->sh_offset = sec->filepos = off;
+		      off += this_hdr->sh_size;
+		    }
 		}
 
 	      if (this_hdr->sh_type != SHT_NOBITS)
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.369
diff -u -p -r1.369 ldlang.c
--- ld/ldlang.c	16 May 2011 11:34:48 -0000	1.369
+++ ld/ldlang.c	23 May 2011 01:16:19 -0000
@@ -1579,8 +1579,14 @@ lang_output_section_find_by_flags (const
 	    }
 	  flags ^= sec->flags;
 	  if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
-			 | SEC_READONLY))
-	      && !(look->flags & (SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+			 | SEC_READONLY | SEC_SMALL_DATA))
+	      || (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+			     | SEC_READONLY))
+		  && !(look->flags & SEC_SMALL_DATA))
+	      || (!(flags & (SEC_THREAD_LOCAL | SEC_ALLOC))
+		  && (look->flags & SEC_THREAD_LOCAL)
+		  && (!(flags & SEC_LOAD)
+		      || (look->flags & SEC_LOAD))))
 	    found = look;
 	}
     }
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.218
diff -u -p -r1.218 elf32.em
--- ld/emultempl/elf32.em	28 Feb 2011 18:34:52 -0000	1.218
+++ ld/emultempl/elf32.em	23 May 2011 01:16:21 -0000
@@ -1920,7 +1920,7 @@ gld${EMULATION_NAME}_place_orphan (asect
 	   && ((iself && sh_type == SHT_NOTE)
 	       || (!iself && CONST_STRNEQ (secname, ".note"))))
     place = &hold[orphan_interp];
-  else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+  else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) == 0)
     place = &hold[orphan_bss];
   else if ((s->flags & SEC_SMALL_DATA) != 0)
     place = &hold[orphan_sdata];

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fix cris-* fallout from Re: Fix PR12763, .tbss mishandling
  2011-05-23  5:41   ` Alan Modra
@ 2011-05-24  0:07     ` Hans-Peter Nilsson
  2011-05-24  3:30       ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-05-24  0:07 UTC (permalink / raw)
  To: amodra; +Cc: binutils

> Date: Mon, 23 May 2011 15:11:25 +0930
> From: Alan Modra <amodra@gmail.com>

> bfd/
> 	PR 12763
> 	* elf.c (assign_file_positions_for_load_sections): Set sh_offset for
> 	.tbss, and page align same for all SHT_NOBITS sections.
> ld/
> 	PR 12763
> 	* ldlang.c (lang_output_section_find_by_flags): Match orphan .sdata2
> 	like sections to existing .sdata2, and similarly for orphan TLS
> 	sections.
> 	* emultempl/elf32.em (place_orphan): Exclude .tbss from orphan_bss.

And here I am, playing catch-up again.  Should we change the
rule regarding who is to update the test-suite?  Committed.

ld/testsuite:

	* ld-cris/tls-e-tpoffcomm1.d: Adjust for second PR12763 change,
	setting TLS file offset.

Index: ld-cris/tls-e-tpoffcomm1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d,v
retrieving revision 1.2
diff -p -u -r1.2 tls-e-tpoffcomm1.d
--- ld-cris/tls-e-tpoffcomm1.d	21 May 2011 01:47:24 -0000	1.2
+++ ld-cris/tls-e-tpoffcomm1.d	24 May 2011 00:02:11 -0000
@@ -12,7 +12,7 @@
 Program Header:
     LOAD off    0x0+ vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*13
          filesz 0x0+84 memsz 0x0+84 flags r-x
-     TLS off    0x0+ vaddr 0x0+82084 paddr 0x0+82084 align 2\*\*2
+     TLS off    0x0+84 vaddr 0x0+82084 paddr 0x0+82084 align 2\*\*2
          filesz 0x0+ memsz 0x0+8 flags r--
 private flags = 0:
 
@@ -20,7 +20,7 @@ Sections:
 Idx Name          Size      VMA       LMA       File off  Algn
   0 .text         0+10  0+80074  0+80074  0+74  2\*\*1
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
-  1 .tbss         0+8  0+82084  0+82084  0+  2\*\*2
+  1 .tbss         0+8  0+82084  0+82084  0+84  2\*\*2
                   ALLOC, THREAD_LOCAL
 SYMBOL TABLE:
 0+80074 l    d  .text	0+ .text

brgds, H-P

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fix cris-* fallout from Re: Fix PR12763, .tbss mishandling
  2011-05-24  0:07     ` Fix cris-* fallout from " Hans-Peter Nilsson
@ 2011-05-24  3:30       ` Alan Modra
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Modra @ 2011-05-24  3:30 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils

On Tue, May 24, 2011 at 02:06:59AM +0200, Hans-Peter Nilsson wrote:
> And here I am, playing catch-up again.

Sorry!  Again.  This time I did actually run tests on lots of targets,
but missed seeing the cris failure.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-24  3:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 15:37 Fix PR12763, .tbss mishandling Alan Modra
2011-05-20 17:27 ` Hans-Peter Nilsson
2011-05-21  1:49   ` Hans-Peter Nilsson
2011-05-23  5:30 ` Alan Modra
2011-05-23  5:41   ` Alan Modra
2011-05-24  0:07     ` Fix cris-* fallout from " Hans-Peter Nilsson
2011-05-24  3:30       ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).