public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: PR ld/3223: ld fails to link correct variables from linker script
@ 2006-09-23 16:36 H. J. Lu
  2006-09-24  0:08 ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-23 16:36 UTC (permalink / raw)
  To: binutils

When an empty output section is ignored, we also ignore its address. I
think we should honor its address.

H.J.
---
ld/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ldlang.c (lang_size_sections_1): Update "dot" for
	ignored output sections if their addresses are set.

ld/testsuite/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ld-scripts/empty-address-1.d: New file.
	* ld-scripts/empty-address-1.s: Likewise.
	* ld-scripts/empty-address-1.t: Likewise.
	* ld-scripts/empty-address-2.d: Likewise.
	* ld-scripts/empty-address-2.s: Likewise.
	* ld-scripts/empty-address-2.t: Likewise.
	* ld-scripts/empty-address.exp: Likewise.

--- ld/ldlang.c.empty	2006-09-22 12:44:41.000000000 -0700
+++ ld/ldlang.c	2006-09-22 17:28:27.000000000 -0700
@@ -4461,7 +4461,10 @@ lang_size_sections_1
 	      }
 	    os->processed_lma = TRUE;
 
-	    if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+	    /* If address of output section is set, we update "dot"
+	       even if it is ignored.  */
+	    if (bfd_is_abs_section (os->bfd_section)
+		|| (os->ignored && !os->addr_tree))
 	      break;
 
 	    /* Keep track of normal sections using the default
@@ -4815,7 +4818,10 @@ lang_do_assignments_1 (lang_statement_un
 	    lang_output_section_statement_type *os;
 
 	    os = &(s->output_section_statement);
-	    if (os->bfd_section != NULL && !os->ignored)
+	    /* If address of output section is set, we update "dot"
+	       even if it is ignored.  */
+	    if (os->bfd_section != NULL
+		&& (!os->ignored || os->addr_tree))
 	      {
 		dot = os->bfd_section->vma;
 
--- ld/testsuite/ld-scripts/empty-address-1.d.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.d	2006-09-22 18:00:44.000000000 -0700
@@ -0,0 +1,8 @@
+#ld: -T empty-address-1.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+0+2000000 A __data_start
+#pass
--- ld/testsuite/ld-scripts/empty-address-1.s.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.s	2006-09-22 17:47:42.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.long __data_start
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-1.t.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.t	2006-09-22 18:00:56.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x0000000: { *(.text) }
+  .data 0x2000000:
+  {
+    __data_start = . ;
+    *(.data)
+  }
+   __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address-2.d.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.d	2006-09-22 18:01:04.000000000 -0700
@@ -0,0 +1,7 @@
+#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+#pass
--- ld/testsuite/ld-scripts/empty-address-2.s.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.s	2006-09-22 17:47:50.000000000 -0700
@@ -0,0 +1,4 @@
+	.text
+	.global _start
+_start:
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-2.t.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.t	2006-09-22 17:48:44.000000000 -0700
@@ -0,0 +1,7 @@
+SECTIONS
+{
+  .text : { *(.text) }
+  .data : { *(.data) }
+   __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address.exp.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address.exp	2006-09-22 18:05:30.000000000 -0700
@@ -0,0 +1,21 @@
+# Make sure that "dot" is updated for empty sections if their addresses
+# are set.
+#   Copyright 2006
+#   Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+run_dump_test empty-address-1
+run_dump_test empty-address-2

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-23 16:36 PATCH: PR ld/3223: ld fails to link correct variables from linker script H. J. Lu
@ 2006-09-24  0:08 ` H. J. Lu
  2006-09-24  3:15   ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-24  0:08 UTC (permalink / raw)
  To: binutils

On Fri, Sep 22, 2006 at 06:09:29PM -0700, H. J. Lu wrote:
> When an empty output section is ignored, we also ignore its address. I
> think we should honor its address.
> 

Here is the updated patch. I added ignored_vma so that we can set it
in one place.


H.J.
---
ld/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ldlang.h (lang_output_section_statement_type): Add ignored_vma.
	* ldlang.c (strip_excluded_output_sections): Set ignored_vma
	to TRUE if address of an empty output section isn't set.
	(lang_size_sections_1): Check ignored_vma for updating "dot",
	instead of ignored.
	(lang_do_assignments_1): Likewise.

ld/testsuite/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ld-scripts/empty-address-1.d: New file.
	* ld-scripts/empty-address-1.s: Likewise.
	* ld-scripts/empty-address-1.t: Likewise.
	* ld-scripts/empty-address-2.d: Likewise.
	* ld-scripts/empty-address-2.s: Likewise.
	* ld-scripts/empty-address-2.t: Likewise.
	* ld-scripts/empty-address.exp: Likewise.

--- ld/ldlang.c.empty	2006-09-22 12:44:41.000000000 -0700
+++ ld/ldlang.c	2006-09-23 09:40:10.000000000 -0700
@@ -3373,6 +3373,9 @@ strip_excluded_output_sections (void)
 	  /* We don't set bfd_section to NULL since bfd_section of the
 	     removed output section statement may still be used.  */
 	  os->ignored = TRUE;
+	  /* If address of an empty output section is set, we update
+	     "dot" even if it is ignored.  */
+	  os->ignored_vma = os->addr_tree == NULL;
 	  output_section->flags |= SEC_EXCLUDE;
 	  bfd_section_list_remove (output_bfd, output_section);
 	  output_bfd->section_count--;
@@ -4461,7 +4464,7 @@ lang_size_sections_1
 	      }
 	    os->processed_lma = TRUE;
 
-	    if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+	    if (bfd_is_abs_section (os->bfd_section) || os->ignored_vma)
 	      break;
 
 	    /* Keep track of normal sections using the default
@@ -4815,7 +4818,7 @@ lang_do_assignments_1 (lang_statement_un
 	    lang_output_section_statement_type *os;
 
 	    os = &(s->output_section_statement);
-	    if (os->bfd_section != NULL && !os->ignored)
+	    if (os->bfd_section != NULL && !os->ignored_vma)
 	      {
 		dot = os->bfd_section->vma;
 
--- ld/ldlang.h.empty	2006-09-07 10:16:34.000000000 -0700
+++ ld/ldlang.h	2006-09-23 09:29:53.000000000 -0700
@@ -154,6 +154,7 @@ typedef struct lang_output_section_state
   unsigned int processed_lma : 1;
   unsigned int all_input_readonly : 1;
   unsigned int ignored : 1; 
+  unsigned int ignored_vma : 1; 
 } lang_output_section_statement_type;
 
 typedef struct
--- ld/testsuite/ld-scripts/empty-address-1.d.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.d	2006-09-22 18:00:44.000000000 -0700
@@ -0,0 +1,8 @@
+#ld: -T empty-address-1.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+0+2000000 A __data_start
+#pass
--- ld/testsuite/ld-scripts/empty-address-1.s.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.s	2006-09-22 17:47:42.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.long __data_start
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-1.t.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.t	2006-09-22 18:00:56.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x0000000: { *(.text) }
+  .data 0x2000000:
+  {
+    __data_start = . ;
+    *(.data)
+  }
+   __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address-2.d.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.d	2006-09-22 18:01:04.000000000 -0700
@@ -0,0 +1,7 @@
+#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+#pass
--- ld/testsuite/ld-scripts/empty-address-2.s.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.s	2006-09-22 17:47:50.000000000 -0700
@@ -0,0 +1,4 @@
+	.text
+	.global _start
+_start:
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-2.t.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.t	2006-09-22 17:48:44.000000000 -0700
@@ -0,0 +1,7 @@
+SECTIONS
+{
+  .text : { *(.text) }
+  .data : { *(.data) }
+   __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address.exp.empty	2006-09-22 17:58:49.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address.exp	2006-09-22 18:05:30.000000000 -0700
@@ -0,0 +1,21 @@
+# Make sure that "dot" is updated for empty sections if their addresses
+# are set.
+#   Copyright 2006
+#   Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+run_dump_test empty-address-1
+run_dump_test empty-address-2

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-24  0:08 ` H. J. Lu
@ 2006-09-24  3:15   ` H. J. Lu
  2006-09-26 12:43     ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-24  3:15 UTC (permalink / raw)
  To: binutils

On Sat, Sep 23, 2006 at 09:56:27AM -0700, H. J. Lu wrote:
> On Fri, Sep 22, 2006 at 06:09:29PM -0700, H. J. Lu wrote:
> > When an empty output section is ignored, we also ignore its address. I
> > think we should honor its address.
> > 
> 
> Here is the updated patch. I added ignored_vma so that we can set it
> in one place.
> 
> 

It turns out that x86-64 linker scripts have

  .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE)
- 1)) :
  {
    *(.ldata .ldata.* .gnu.linkonce.l.*)
    . = ALIGN(. != 0 ? 64 / 8 : 1);
  }
  . = ALIGN(64 / 8);
  _end = .; PROVIDE (end = .);

If .ldata is empty, we want to totally remove it without any trace.
This patch will hornor the constant adress of an empty output section.


H.J.
---
ld/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ldlang.h (lang_output_section_statement_type): Add ignored_vma.
	* ldlang.c (strip_excluded_output_sections): Set ignored_vma
	to TRUE if address of an empty output section isn't set to a
	constant.
	(lang_size_sections_1): Check ignored_vma for updating "dot",
	instead of ignored.
	(lang_do_assignments_1): Likewise.

ld/testsuite/

2006-09-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	* ld-scripts/empty-address-1.d: New file.
	* ld-scripts/empty-address-1.s: Likewise.
	* ld-scripts/empty-address-1.t: Likewise.
	* ld-scripts/empty-address-2.d: Likewise.
	* ld-scripts/empty-address-2.s: Likewise.
	* ld-scripts/empty-address-2.t: Likewise.
	* ld-scripts/empty-address-3.s: Likewise.
	* ld-scripts/empty-address-3a.d: Likewise.
	* ld-scripts/empty-address-3a.t: Likewise.
	* ld-scripts/empty-address-3b.d: Likewise.
	* ld-scripts/empty-address-3b.t: Likewise.
	* ld-scripts/empty-address.exp: Likewise.

--- ld/ldlang.c.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/ldlang.c	2006-09-23 13:58:58.000000000 -0700
@@ -3373,6 +3373,11 @@ strip_excluded_output_sections (void)
 	  /* We don't set bfd_section to NULL since bfd_section of the
 	     removed output section statement may still be used.  */
 	  os->ignored = TRUE;
+	  /* If address of an empty output section is set to a constant,
+	     we update "dot" even if it is ignored.  */
+	  os->ignored_vma
+	    = (os->addr_tree == NULL
+	       || os->addr_tree->type.node_class != etree_value);
 	  output_section->flags |= SEC_EXCLUDE;
 	  bfd_section_list_remove (output_bfd, output_section);
 	  output_bfd->section_count--;
@@ -4461,7 +4466,7 @@ lang_size_sections_1
 	      }
 	    os->processed_lma = TRUE;
 
-	    if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+	    if (bfd_is_abs_section (os->bfd_section) || os->ignored_vma)
 	      break;
 
 	    /* Keep track of normal sections using the default
@@ -4815,7 +4820,7 @@ lang_do_assignments_1 (lang_statement_un
 	    lang_output_section_statement_type *os;
 
 	    os = &(s->output_section_statement);
-	    if (os->bfd_section != NULL && !os->ignored)
+	    if (os->bfd_section != NULL && !os->ignored_vma)
 	      {
 		dot = os->bfd_section->vma;
 
--- ld/ldlang.h.empty	2006-09-07 10:16:34.000000000 -0700
+++ ld/ldlang.h	2006-09-23 09:46:41.000000000 -0700
@@ -154,6 +154,7 @@ typedef struct lang_output_section_state
   unsigned int processed_lma : 1;
   unsigned int all_input_readonly : 1;
   unsigned int ignored : 1; 
+  unsigned int ignored_vma : 1; 
 } lang_output_section_statement_type;
 
 typedef struct
--- ld/testsuite/ld-scripts/empty-address-1.d.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.d	2006-09-23 09:46:41.000000000 -0700
@@ -0,0 +1,8 @@
+#ld: -T empty-address-1.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+0+2000000 A __data_start
+#pass
--- ld/testsuite/ld-scripts/empty-address-1.s.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.s	2006-09-23 09:46:41.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.long __data_start
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-1.t.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-1.t	2006-09-23 14:10:30.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x0000000: { *(.text) }
+  .data 0x2000000:
+  {
+    __data_start = . ;
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address-2.d.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.d	2006-09-23 09:46:41.000000000 -0700
@@ -0,0 +1,7 @@
+#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+#pass
--- ld/testsuite/ld-scripts/empty-address-2.s.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.s	2006-09-23 09:46:41.000000000 -0700
@@ -0,0 +1,4 @@
+	.text
+	.global _start
+_start:
+	.long __data_end
--- ld/testsuite/ld-scripts/empty-address-2.t.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-2.t	2006-09-23 14:10:38.000000000 -0700
@@ -0,0 +1,7 @@
+SECTIONS
+{
+  .text : { *(.text) }
+  .data : { *(.data) }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address-3.s.empty	2006-09-23 14:12:51.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-3.s	2006-09-23 13:59:46.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.byte 0,0,0,0,0,0,0,0
+	.byte 0,0,0,0,0,0,0,0
--- ld/testsuite/ld-scripts/empty-address-3a.d.empty	2006-09-23 14:12:51.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-3a.d	2006-09-23 14:08:07.000000000 -0700
@@ -0,0 +1,8 @@
+#source: empty-address-3.s
+#ld: -T empty-address-3a.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#pass
--- ld/testsuite/ld-scripts/empty-address-3a.t.empty	2006-09-23 14:12:51.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-3a.t	2006-09-23 14:10:43.000000000 -0700
@@ -0,0 +1,10 @@
+SECTIONS
+{
+  .text 0x00000000: { *(.text) }
+  .data ALIGN(0x1000) + (. & (0x1000 - 1)):
+  {
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address-3b.d.empty	2006-09-23 14:12:51.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-3b.d	2006-09-23 14:04:58.000000000 -0700
@@ -0,0 +1,10 @@
+#source: empty-address-3.s
+#ld: -T empty-address-3b.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#...
+0+1010 A __data_start
+#pass
--- ld/testsuite/ld-scripts/empty-address-3b.t.empty	2006-09-23 14:12:51.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address-3b.t	2006-09-23 14:10:24.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x00000000: { *(.text) }
+  .data ALIGN(0x1000) + (. & (0x1000 - 1)):
+  {
+    __data_start = .;
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- ld/testsuite/ld-scripts/empty-address.exp.empty	2006-09-23 09:46:41.000000000 -0700
+++ ld/testsuite/ld-scripts/empty-address.exp	2006-09-23 14:02:52.000000000 -0700
@@ -0,0 +1,23 @@
+# Make sure that "dot" is updated for empty sections if their addresses
+# are set.
+#   Copyright 2006
+#   Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+run_dump_test empty-address-1
+run_dump_test empty-address-2
+run_dump_test empty-address-3a
+run_dump_test empty-address-3b

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-24  3:15   ` H. J. Lu
@ 2006-09-26 12:43     ` Alan Modra
  2006-09-26 13:57       ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-09-26 12:43 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Sat, Sep 23, 2006 at 04:05:28PM -0700, H. J. Lu wrote:
> On Sat, Sep 23, 2006 at 09:56:27AM -0700, H. J. Lu wrote:
> > On Fri, Sep 22, 2006 at 06:09:29PM -0700, H. J. Lu wrote:
> > > When an empty output section is ignored, we also ignore its address. I
> > > think we should honor its address.
> > 
> > Here is the updated patch. I added ignored_vma so that we can set it
> > in one place.
> 
> It turns out that x86-64 linker scripts have

This is getting too complicated.  Can we take a step back and ask
ourselves exactly what we are trying to accomplish with empty section
removal?

I think it is quite reasonable to remove empty output sections, even
those used to define symbols via the linker script (the symbols
become absolute).  The case for ignoring linker script VMA and LMA
assignments isn't so strong, particularly since doing so can affect
following sections.  I think it would be safest if we went back to
always obeying them, even for ALIGN expressions.  Alternatively, we
could completely ignore the VMA and LMA assignments on empty output
sections.  I agree that the current situation, where we take note of
the VMA only within the section, is silly.

Given a linker script like the following

. = 0x123;
.data 0x1000 :
{
  __data_start = .;
  *(.data)
}
__data_end = .;

and assuming no input .data sections, obeying the VMA value would set
both __data_start and __data_end to 0x1000.  Ignoring the VMA would
set both __data_start and __data_end to 0x123.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-26 12:43     ` Alan Modra
@ 2006-09-26 13:57       ` H. J. Lu
  2006-09-27  0:41         ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-26 13:57 UTC (permalink / raw)
  To: binutils

On Tue, Sep 26, 2006 at 08:11:57PM +0930, Alan Modra wrote:
> I think it is quite reasonable to remove empty output sections, even
> those used to define symbols via the linker script (the symbols
> become absolute).  The case for ignoring linker script VMA and LMA
> assignments isn't so strong, particularly since doing so can affect
> following sections.  I think it would be safest if we went back to
> always obeying them, even for ALIGN expressions.  Alternatively, we
> could completely ignore the VMA and LMA assignments on empty output
> sections.  I agree that the current situation, where we take note of
> the VMA only within the section, is silly.
> 

Obey ALIGN expressions on empty output sections will break x86-64. I
noticed that when I was building glibc on x86-64.

Constant VMA setting is used to load a section to a fixed address and
all sections after that. The value of nn expression for VMA can change.
"." is a possibility. We can document the linker as

.data EXPRESSSION : ...

If .data is empty and EXPRESSSION isn't a constant, EXPRESSSION = .;


H.J.

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-26 13:57       ` H. J. Lu
@ 2006-09-27  0:41         ` Alan Modra
  2006-09-27  3:52           ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-09-27  0:41 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Tue, Sep 26, 2006 at 06:54:14AM -0700, H. J. Lu wrote:
> On Tue, Sep 26, 2006 at 08:11:57PM +0930, Alan Modra wrote:
> > I think it is quite reasonable to remove empty output sections, even
> > those used to define symbols via the linker script (the symbols
> > become absolute).  The case for ignoring linker script VMA and LMA
> > assignments isn't so strong, particularly since doing so can affect
> > following sections.  I think it would be safest if we went back to
> > always obeying them, even for ALIGN expressions.  Alternatively, we
> > could completely ignore the VMA and LMA assignments on empty output
> > sections.  I agree that the current situation, where we take note of
> > the VMA only within the section, is silly.
> 
> Obey ALIGN expressions on empty output sections will break x86-64. I
> noticed that when I was building glibc on x86-64.

How does it break, and why?  If you were using an older linker that
didn't remove empty output sections, then of course the linker would
obey the ALIGN expression in a section VMA.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-27  0:41         ` Alan Modra
@ 2006-09-27  3:52           ` H. J. Lu
  2006-09-27  4:07             ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-27  3:52 UTC (permalink / raw)
  To: binutils

On Wed, Sep 27, 2006 at 09:20:32AM +0930, Alan Modra wrote:
> On Tue, Sep 26, 2006 at 06:54:14AM -0700, H. J. Lu wrote:
> > On Tue, Sep 26, 2006 at 08:11:57PM +0930, Alan Modra wrote:
> > > I think it is quite reasonable to remove empty output sections, even
> > > those used to define symbols via the linker script (the symbols
> > > become absolute).  The case for ignoring linker script VMA and LMA
> > > assignments isn't so strong, particularly since doing so can affect
> > > following sections.  I think it would be safest if we went back to
> > > always obeying them, even for ALIGN expressions.  Alternatively, we
> > > could completely ignore the VMA and LMA assignments on empty output
> > > sections.  I agree that the current situation, where we take note of
> > > the VMA only within the section, is silly.
> > 
> > Obey ALIGN expressions on empty output sections will break x86-64. I
> > noticed that when I was building glibc on x86-64.
> 
> How does it break, and why?  If you were using an older linker that

I will take a look at why after I come back from my vacation.

> didn't remove empty output sections, then of course the linker would
> obey the ALIGN expression in a section VMA.

But the older linker doesn't have

  .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE)
- 1)) :   {
    *(.ldata .ldata.* .gnu.linkonce.l.*)
    . = ALIGN(. != 0 ? 64 / 8 : 1);
  }
  . = ALIGN(64 / 8);
  _end = .; PROVIDE (end = .);


H.J.

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-27  3:52           ` H. J. Lu
@ 2006-09-27  4:07             ` Alan Modra
  2006-09-27  9:46               ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-09-27  4:07 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Tue, Sep 26, 2006 at 05:41:25PM -0700, H. J. Lu wrote:
> On Wed, Sep 27, 2006 at 09:20:32AM +0930, Alan Modra wrote:
> > On Tue, Sep 26, 2006 at 06:54:14AM -0700, H. J. Lu wrote:
> > > On Tue, Sep 26, 2006 at 08:11:57PM +0930, Alan Modra wrote:
> > > > I think it is quite reasonable to remove empty output sections, even
> > > > those used to define symbols via the linker script (the symbols
> > > > become absolute).  The case for ignoring linker script VMA and LMA
> > > > assignments isn't so strong, particularly since doing so can affect
> > > > following sections.  I think it would be safest if we went back to
> > > > always obeying them, even for ALIGN expressions.  Alternatively, we
> > > > could completely ignore the VMA and LMA assignments on empty output
> > > > sections.  I agree that the current situation, where we take note of
> > > > the VMA only within the section, is silly.
> > > 
> > > Obey ALIGN expressions on empty output sections will break x86-64. I
> > > noticed that when I was building glibc on x86-64.
> > 
> > How does it break, and why?  If you were using an older linker that
> 
> I will take a look at why after I come back from my vacation.
> 
> > didn't remove empty output sections, then of course the linker would
> > obey the ALIGN expression in a section VMA.
> 
> But the older linker doesn't have
> 
>   .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE)
> - 1)) :   {
>     *(.ldata .ldata.* .gnu.linkonce.l.*)
>     . = ALIGN(. != 0 ? 64 / 8 : 1);
>   }
>   . = ALIGN(64 / 8);
>   _end = .; PROVIDE (end = .);

This VMA expression is more than just a simple ALIGN.  Ideally, I guess
you'd like the linker to *not* take notice of the VMA in this case if
.ldata turned out to be empty, as obeying the VMA expression puts _end
MAXPAGESIZE past the actual end.

I still think that special cases for certain types of VMA expression
is bad design.  Obey them all, or ignore all VMAs on empty output
sections.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-27  4:07             ` Alan Modra
@ 2006-09-27  9:46               ` H. J. Lu
  2006-09-27 11:14                 ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2006-09-27  9:46 UTC (permalink / raw)
  To: binutils

On Wed, Sep 27, 2006 at 11:21:23AM +0930, Alan Modra wrote:
> 
> I still think that special cases for certain types of VMA expression
> is bad design.  Obey them all, or ignore all VMAs on empty output
> sections.
> 

Here is a patch to ignore all VMAs on discarded empty output sections.


H.J.
--
bfd/

2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* elf.c (assign_file_positions_for_non_load_sections): Don't
	warn zero size allocated sections.

ld/

2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* ld.texinfo: Updated Output Section Discarding.

	* ldlang.h (lang_output_section_statement_type): Add
	section_relative_symbol.
	* ldlang.c (strip_excluded_output_sections): Don't strip a
	section with a symbol relative to it.
	(lang_size_sections_1): Mark if an output section has a symbol
	symbol relative to it.

ld/testsuite/

2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* ld-scripts/empty-address-1.d: New file.
	* ld-scripts/empty-address-1.s: Likewise.
	* ld-scripts/empty-address-1.t: Likewise.
	* ld-scripts/empty-address-2.s: Likewise.
	* ld-scripts/empty-address-2a.d: Likewise.
	* ld-scripts/empty-address-2a.t: Likewise.
	* ld-scripts/empty-address-2b.d: Likewise.
	* ld-scripts/empty-address-2b.t: Likewise.
	* ld-scripts/empty-address-3.s: Likewise.
	* ld-scripts/empty-address-3a.d: Likewise.
	* ld-scripts/empty-address-3a.t: Likewise.
	* ld-scripts/empty-address-3b.d: Likewise.
	* ld-scripts/empty-address-3b.t: Likewise.
	* ld-scripts/empty-address-3c.d: Likewise.
	* ld-scripts/empty-address-3c.t: Likewise.
	* ld-scripts/empty-address.exp: Likewise.

--- binutils/bfd/elf.c.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/bfd/elf.c	2006-09-26 19:51:34.000000000 -0700
@@ -4662,12 +4662,13 @@ assign_file_positions_for_non_load_secti
 	hdr->sh_offset = hdr->bfd_section->filepos;
       else if ((hdr->sh_flags & SHF_ALLOC) != 0)
 	{
-	  ((*_bfd_error_handler)
-	   (_("%B: warning: allocated section `%s' not in segment"),
-	    abfd,
-	    (hdr->bfd_section == NULL
-	     ? "*unknown*"
-	     : hdr->bfd_section->name)));
+	  if (hdr->sh_size != 0)
+	    ((*_bfd_error_handler)
+	     (_("%B: warning: allocated section `%s' not in segment"),
+		abfd,
+		(hdr->bfd_section == NULL
+		 ? "*unknown*" 
+		 : hdr->bfd_section->name)));
 	  if ((abfd->flags & D_PAGED) != 0)
 	    off += vma_page_aligned_bias (hdr->sh_addr, off,
 					  bed->maxpagesize);
--- binutils/ld/ld.texinfo.empty	2006-09-26 07:06:53.000000000 -0700
+++ binutils/ld/ld.texinfo	2006-09-26 19:54:48.000000000 -0700
@@ -3688,7 +3688,7 @@ The linker will not create output sectio
 contents.  This is for convenience when referring to input sections that
 may or may not be present in any of the input files.  For example:
 @smallexample
-.foo @{ *(.foo) @}
+.foo : @{ *(.foo) @}
 @end smallexample
 @noindent
 will only create a @samp{.foo} section in the output file if there is a
@@ -3697,6 +3697,8 @@ will only create a @samp{.foo} section i
 If you use anything other than an input section description as an output
 section command, such as a symbol assignment, then the output section
 will always be created, even if there are no matching input sections.
+When a section is discarded, its address (@xref{Output Section Address})
+will also be ignored.
 
 @cindex /DISCARD/
 The special output section name @samp{/DISCARD/} may be used to discard
--- binutils/ld/ldlang.c.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/ldlang.c	2006-09-26 19:53:03.000000000 -0700
@@ -3343,6 +3343,7 @@ strip_excluded_output_sections (void)
 	continue;
 
       exclude = (output_section->rawsize == 0
+		 && !os->section_relative_symbol
 		 && (output_section->flags & SEC_KEEP) == 0
 		 && !bfd_section_removed_from_list (output_bfd,
 						    output_section));
@@ -4630,11 +4631,19 @@ lang_size_sections_1
 	case lang_assignment_statement_enum:
 	  {
 	    bfd_vma newdot = dot;
+	    etree_type *tree = s->assignment_statement.exp;
 
-	    exp_fold_tree (s->assignment_statement.exp,
+	    exp_fold_tree (tree,
 			   output_section_statement->bfd_section,
 			   &newdot);
 
+	    /* This symbol is relative to this section.  */
+	    if ((tree->type.node_class == etree_provided 
+		 || tree->type.node_class == etree_assign)
+		&& (tree->assign.dst [0] != '.'
+		    || tree->assign.dst [1] != '\0'))
+	      output_section_statement->section_relative_symbol = 1;
+
 	    if (!output_section_statement->ignored)
 	      {
 		if (output_section_statement == abs_output_section)
--- binutils/ld/ldlang.h.empty	2006-09-07 10:16:34.000000000 -0700
+++ binutils/ld/ldlang.h	2006-09-26 19:53:23.000000000 -0700
@@ -153,7 +153,10 @@ typedef struct lang_output_section_state
   unsigned int processed_vma : 1;
   unsigned int processed_lma : 1;
   unsigned int all_input_readonly : 1;
+  /* If this section should be ignored.  */
   unsigned int ignored : 1; 
+  /* If there is a symbol relative to this section.  */
+  unsigned int section_relative_symbol : 1; 
 } lang_output_section_statement_type;
 
 typedef struct
--- binutils/ld/testsuite/ld-scripts/empty-address-1.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-1.d	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,8 @@
+#ld: -T empty-address-1.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+2000000 A __data_end
+0+2000000 D __data_start
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-1.s.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-1.s	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.long __data_start
+	.long __data_end
--- binutils/ld/testsuite/ld-scripts/empty-address-1.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-1.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x0000000: { *(.text) }
+  .data 0x2000000:
+  {
+    __data_start = . ;
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address-2.s.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-2.s	2006-09-26 20:03:40.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.long __data_end
+	.p2align 4
--- binutils/ld/testsuite/ld-scripts/empty-address-2a.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-2a.d	2006-09-26 20:00:20.000000000 -0700
@@ -0,0 +1,8 @@
+#source: empty-address-2.s
+#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2a.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-2a.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-2a.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,7 @@
+SECTIONS
+{
+  .text : { *(.text) }
+  .data : { *(.data) }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address-2b.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-2b.d	2006-09-26 20:00:56.000000000 -0700
@@ -0,0 +1,8 @@
+#source: empty-address-2.s
+#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2b.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-2b.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-2b.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x0000000: { *(.text) }
+  .data :
+  {
+    PROVIDE (__data_start = .);
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address-3.s.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3.s	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,5 @@
+	.text
+	.global _start
+_start:
+	.byte 0,0,0,0,0,0,0,0
+	.byte 0,0,0,0,0,0,0,0
--- binutils/ld/testsuite/ld-scripts/empty-address-3a.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3a.d	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,8 @@
+#source: empty-address-3.s
+#ld: -T empty-address-3a.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-3a.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3a.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,10 @@
+SECTIONS
+{
+  .text 0x00000000: { *(.text) }
+  .data ALIGN(0x1000) + (. & (0x1000 - 1)):
+  {
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address-3b.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3b.d	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,8 @@
+#source: empty-address-3.s
+#ld: -T empty-address-3b.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+10 A __data_end
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-3b.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3b.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x00000000: { *(.text) }
+  .data ALIGN(0x1000) + (. & (0x1000 - 1)):
+  {
+    PROVIDE (__data_start = .);
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address-3c.d.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3c.d	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,10 @@
+#source: empty-address-3.s
+#ld: -T empty-address-3c.t
+#nm: -n
+#...
+0+0 T _start
+#...
+0+1010 A __data_end
+#...
+0+1010 D __data_start
+#pass
--- binutils/ld/testsuite/ld-scripts/empty-address-3c.t.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address-3c.t	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,11 @@
+SECTIONS
+{
+  .text 0x00000000: { *(.text) }
+  .data ALIGN(0x1000) + (. & (0x1000 - 1)):
+  {
+    __data_start = .;
+    *(.data)
+  }
+  __data_end = .;
+  /DISCARD/ : { *(.*) }
+}
--- binutils/ld/testsuite/ld-scripts/empty-address.exp.empty	2006-09-26 19:51:34.000000000 -0700
+++ binutils/ld/testsuite/ld-scripts/empty-address.exp	2006-09-26 19:51:34.000000000 -0700
@@ -0,0 +1,25 @@
+# Make sure that "dot" is updated for empty sections if their addresses
+# are set.
+#   Copyright 2006
+#   Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+run_dump_test empty-address-1
+run_dump_test empty-address-2a
+run_dump_test empty-address-2b
+run_dump_test empty-address-3a
+run_dump_test empty-address-3b
+run_dump_test empty-address-3c

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

* Re: PATCH: PR ld/3223: ld fails to link correct variables from linker script
  2006-09-27  9:46               ` H. J. Lu
@ 2006-09-27 11:14                 ` Alan Modra
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Modra @ 2006-09-27 11:14 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Tue, Sep 26, 2006 at 08:09:45PM -0700, H. J. Lu wrote:
> Here is a patch to ignore all VMAs on discarded empty output sections.

This looks good.  Please apply.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

end of thread, other threads:[~2006-09-27  3:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-23 16:36 PATCH: PR ld/3223: ld fails to link correct variables from linker script H. J. Lu
2006-09-24  0:08 ` H. J. Lu
2006-09-24  3:15   ` H. J. Lu
2006-09-26 12:43     ` Alan Modra
2006-09-26 13:57       ` H. J. Lu
2006-09-27  0:41         ` Alan Modra
2006-09-27  3:52           ` H. J. Lu
2006-09-27  4:07             ` Alan Modra
2006-09-27  9:46               ` H. J. Lu
2006-09-27 11:14                 ` 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).