public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [RFC] [PATCH] ld: Add --no-print-map-discarded option
@ 2018-07-27 16:03 fshahbazker
  2018-08-01 14:56 ` Nick Clifton
  0 siblings, 1 reply; 10+ messages in thread
From: fshahbazker @ 2018-07-27 16:03 UTC (permalink / raw)
  To: binutils

Hi,

This patch introduces an option to disable the listing of discarded sections
in map file output. The use case stems from a largeish application built with
-ffunction-sections & --gc-sections where the list of discarded sections
blows up the map file output. The default behaviour will ofcourse remain
to print discarded sections, but the new option would allow us to disable it.

Comments welcome.

Regards,
Faraz Shahbazker

Faraz Shahbazker (1):
  ld: Add --no-print-map-discarded option

 ld/ld.h                                   |  3 +++
 ld/ldlang.c                               | 25 +++++++++++++------------
 ld/ldlex.h                                |  2 ++
 ld/ldmain.c                               |  1 +
 ld/lexsup.c                               | 12 ++++++++++++
 ld/testsuite/ld-gc/gc.exp                 |  2 ++
 ld/testsuite/ld-gc/skip-map-discarded.d   |  3 +++
 ld/testsuite/ld-gc/skip-map-discarded.map |  5 +++++
 ld/testsuite/ld-gc/skip-map-discarded.s   |  5 +++++
 9 files changed, 46 insertions(+), 12 deletions(-)
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.d
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.map
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.s

-- 
2.7.4

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

* Re: [RFC] [PATCH] ld: Add --no-print-map-discarded option
  2018-07-27 16:03 [RFC] [PATCH] ld: Add --no-print-map-discarded option fshahbazker
@ 2018-08-01 14:56 ` Nick Clifton
  2018-08-01 15:04   ` Faraz Shahbazker
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Clifton @ 2018-08-01 14:56 UTC (permalink / raw)
  To: fshahbazker, binutils

Hi Franz,

> This patch introduces an option to disable the listing of discarded sections
> in map file output. The use case stems from a largeish application built with
> -ffunction-sections & --gc-sections where the list of discarded sections
> blows up the map file output. The default behaviour will ofcourse remain
> to print discarded sections, but the new option would allow us to disable it.

I liked this patch, and I would be happy to apply it.  One small problem though -
do you/wavecomp have an FSF copyright assignment in place ?  We really need one
when adding a new feature like this...

Cheers
  Nick

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

* Re: [RFC] [PATCH] ld: Add --no-print-map-discarded option
  2018-08-01 14:56 ` Nick Clifton
@ 2018-08-01 15:04   ` Faraz Shahbazker
  2018-08-01 16:01     ` Nick Clifton
  0 siblings, 1 reply; 10+ messages in thread
From: Faraz Shahbazker @ 2018-08-01 15:04 UTC (permalink / raw)
  To: Nick Clifton, binutils

On 08/01/2018 07:56 AM, Nick Clifton wrote:
> I liked this patch, and I would be happy to apply it.  One small problem though -
> do you/wavecomp have an FSF copyright assignment in place ?  We really need one
> when adding a new feature like this...

Yeah, I might have jumped the lights with that patch. I understand that we have
FSF assignment in place for MIPS Tech. We recently got acquired by Wave. We're
consulting with lawyers to understand if the assignment stays valid. Otherwise,
I will re-post once the new copyright assignment comes through. Thanks for the
feedback.

Regards,
Faraz Shahbazker

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

* Re: [RFC] [PATCH] ld: Add --no-print-map-discarded option
  2018-08-01 15:04   ` Faraz Shahbazker
@ 2018-08-01 16:01     ` Nick Clifton
  2019-04-02 19:58       ` [PATCH v2] " Faraz Shahbazker
  2019-04-02 20:17       ` [PATCH v3] " Faraz Shahbazker
  0 siblings, 2 replies; 10+ messages in thread
From: Nick Clifton @ 2018-08-01 16:01 UTC (permalink / raw)
  To: Faraz Shahbazker, binutils

Hi Faraz,

> Yeah, I might have jumped the lights with that patch. I understand that we have
> FSF assignment in place for MIPS Tech. We recently got acquired by Wave. We're
> consulting with lawyers to understand if the assignment stays valid. Otherwise,
> I will re-post once the new copyright assignment comes through. Thanks for the
> feedback.

Great - once that is sorted out, would you mind posting a version 2 of the patch
which addresses these small issues:

  * There should be an entry in ld/NEWS mentioning the new feature.

  * There should be documentation in ld/ld.texi describing the new option.

  * The --help output (from ld_options[] array in lexsup.c) should indicate
    which of the two new options is the default.

  * The linker command line in the new skip-map-discarded.d test driver file
    should include "-e 0" to stop the linker from complaining about the
    starting address not being defined.

  * Either the skip-map-discard.s assembler source file should be modified
    so that the .section directive will work with non-ELF targets (by simply
    omitting all of the text after ".section _foo") or else the placement of
    the "run_dump_test skip-map-discarded" line in gc.exp should be moved so
    that the test is only run for ELF based targets.

  Thanks.

Cheers
  Nick

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

* [PATCH v2] ld: Add --no-print-map-discarded option
  2018-08-01 16:01     ` Nick Clifton
@ 2019-04-02 19:58       ` Faraz Shahbazker
  2019-04-02 20:17       ` [PATCH v3] " Faraz Shahbazker
  1 sibling, 0 replies; 10+ messages in thread
From: Faraz Shahbazker @ 2019-04-02 19:58 UTC (permalink / raw)
  To: binutils, nickc; +Cc: Faraz Shahbazker

Add a new option to disable the listing of discarded sections
in map file output.  The use case stems from a large application
built with -ffunction-sections --gc-sections where the list of
discarded sections blows up the map file output.  The default
behaviour remains to print discarded sections,  but the new option
allows us to disable it.

ld/
	* NEWS: Mention new option --no-print-map-discarded.
	* ld.h (ld_config_type) <print_map_discarded>: New field.
	* ldlang.c (lang_map): Conditionally output discarded sections
	in map files based on configuration option.
	* ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
	OPTION_NO_PRINT_MAP_DISCARDED>: New.
	* ldmain.c (main): Enabled print_map_discarded by default.
	* lexsup.c (ld_options): Add new command-line options.
	(parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
	OPTION_PRINT_MAP_DISCARDED>: New cases.
	* ld.texi: Document new options.
	* testsuite/ld-gc/gc.exp: Add new test.
	* testsuite/ld-gc/skip-map-discarded.s: New file.
	* testsuite/ld-gc/skip-map-discarded.d: New file.
	* testsuite/ld-gc/skip-map-discarded.map: New file.
---

This is version 2 of a patch posted for review few months back, but not
committed due to pending copyright assignment. I am told that the FSF
copyright assignment for Wave Computing is now in place. Please review
and commit.

 ld/NEWS                                   |  2 ++
 ld/ld.h                                   |  3 +++
 ld/ld.texi                                |  8 ++++++++
 ld/ldlang.c                               | 25 +++++++++++++------------
 ld/ldlex.h                                |  2 ++
 ld/ldmain.c                               |  1 +
 ld/lexsup.c                               | 14 ++++++++++++++
 ld/testsuite/ld-gc/gc.exp                 |  2 ++
 ld/testsuite/ld-gc/skip-map-discarded.d   |  3 +++
 ld/testsuite/ld-gc/skip-map-discarded.map |  5 +++++
 ld/testsuite/ld-gc/skip-map-discarded.s   |  5 +++++
 11 files changed, 58 insertions(+), 12 deletions(-)
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.d
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.map
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.s

diff --git a/ld/NEWS b/ld/NEWS
index 597845a..de2cd16 100644
--- b/ld/NEWS
+++ a/ld/NEWS
@@ -1,7 +1,5 @@
 -*- text -*-
 
-* Add command-line option --no-print-map-discarded.
-
 Changes in 2.33:
 
 * Add target handlers for AArch64 for ELF GNU program properties.
diff --git a/ld/ld.h b/ld/ld.h
index b97d977..55078a9 100644
--- b/ld/ld.h
+++ a/ld/ld.h
@@ -318,9 +318,6 @@
 
   /* The common page size for ELF.  */
   bfd_vma commonpagesize;
-
-  /* If set, print discarded sections in map file output.  */
-  bfd_boolean print_map_discarded;
 } ld_config_type;
 
 extern ld_config_type config;
diff --git a/ld/ld.texi b/ld/ld.texi
index 0bcbec4..d88bdb4 100644
--- b/ld/ld.texi
+++ a/ld/ld.texi
@@ -783,14 +783,6 @@
 is 0x1, and @file{bar.o}, whose 0xc0010001 property value is 0x1.
 @end itemize
 
-@cindex link map discarded
-@kindex --print-map-discarded
-@kindex --no-print-map-discarded
-@item --print-map-discarded
-@itemx --no-print-map-discarded
-Print (or do not print) the list of discarded and garbage collected sections
-in the link map.  Enabled by default.
-
 @kindex -n
 @cindex read-only text
 @cindex NMAGIC
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 1952d4a..898735e 100644
--- b/ld/ldlang.c
+++ a/ld/ldlang.c
@@ -2251,20 +2251,19 @@
 	  || file->flags.just_syms)
 	continue;
 
-      if (config.print_map_discarded)
-	for (s = file->the_bfd->sections; s != NULL; s = s->next)
-	  if ((s->output_section == NULL
-	       || s->output_section->owner != link_info.output_bfd)
-	      && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
-	    {
-	      if (! dis_header_printed)
-		{
-		  fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
-		  dis_header_printed = TRUE;
-		}
+      for (s = file->the_bfd->sections; s != NULL; s = s->next)
+	if ((s->output_section == NULL
+	     || s->output_section->owner != link_info.output_bfd)
+	    && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
+	  {
+	    if (!dis_header_printed)
+	      {
+		fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
+		dis_header_printed = TRUE;
+	      }
 
-	      print_input_section (s, TRUE);
-	    }
+	    print_input_section (s, TRUE);
+	  }
     }
 
   minfo (_("\nMemory Configuration\n\n"));
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 32853de..32a7a64 100644
--- b/ld/ldlex.h
+++ a/ld/ldlex.h
@@ -148,8 +148,6 @@
   OPTION_REQUIRE_DEFINED_SYMBOL,
   OPTION_ORPHAN_HANDLING,
   OPTION_FORCE_GROUP_ALLOCATION,
-  OPTION_PRINT_MAP_DISCARDED,
-  OPTION_NO_PRINT_MAP_DISCARDED,
 };
 
 /* The initial parser states.  */
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 77cdbd0..da1c6a7 100644
--- b/ld/ldmain.c
+++ a/ld/ldmain.c
@@ -264,7 +264,6 @@
   config.make_executable = TRUE;
   config.magic_demand_paged = TRUE;
   config.text_read_only = TRUE;
-  config.print_map_discarded = TRUE;
   link_info.disable_target_specific_optimizations = -1;
 
   command_line.warn_mismatch = TRUE;
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 88e85c7..dacb962 100644
--- b/ld/lexsup.c
+++ a/ld/lexsup.c
@@ -543,12 +543,6 @@
   { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
     '\0', N_("=MODE"), N_("Control how orphan sections are handled."),
     TWO_DASHES },
-  { {"print-map-discarded", no_argument, NULL, OPTION_PRINT_MAP_DISCARDED},
-    '\0', NULL, N_("Show discarded sections in map file output (default)"),
-    TWO_DASHES },
-  { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
-    '\0', NULL, N_("Do not show discarded sections in map file output"),
-    TWO_DASHES },
 };
 
 #define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1583,14 +1577,6 @@
 	    einfo (_("%F%P: invalid argument to option"
 		     " \"--orphan-handling\"\n"));
 	  break;
-
-	case OPTION_NO_PRINT_MAP_DISCARDED:
-	  config.print_map_discarded = FALSE;
-	  break;
-
-	case OPTION_PRINT_MAP_DISCARDED:
-	  config.print_map_discarded = TRUE;
-	  break;
 	}
     }
 
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 536356c..13968cc 100644
--- b/ld/testsuite/ld-gc/gc.exp
+++ a/ld/testsuite/ld-gc/gc.exp
@@ -171,5 +171,3 @@
     ]
     run_dump_test "pr20306"
 }
-
-run_dump_test "skip-map-discarded"
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.d b/ld/testsuite/ld-gc/skip-map-discarded.d
new file mode 100644
index 0000000..2e79f0b
--- b/ld/testsuite/ld-gc/skip-map-discarded.d
+++ /dev/null
@@ -1,3 +0,0 @@
-#name: Check --no-print-map-discarded linker option
-#ld: -e 0 --gc-sections --no-print-map-discarded
-#map: skip-map-discarded.map
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.map b/ld/testsuite/ld-gc/skip-map-discarded.map
new file mode 100644
index 0000000..ca4818e
--- b/ld/testsuite/ld-gc/skip-map-discarded.map
+++ /dev/null
@@ -1,5 +0,0 @@
-#failif
-Discarded input sections
-#...
- _foo.*
-#...
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.s b/ld/testsuite/ld-gc/skip-map-discarded.s
new file mode 100644
index 0000000..630aab0
--- b/ld/testsuite/ld-gc/skip-map-discarded.s
+++ /dev/null
@@ -1,5 +0,0 @@
-.globl __start
-__start:
-	.section	_foo
-foo:
-	.long	1
+- 
2.9.5

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

* [PATCH v3] ld: Add --no-print-map-discarded option
  2018-08-01 16:01     ` Nick Clifton
  2019-04-02 19:58       ` [PATCH v2] " Faraz Shahbazker
@ 2019-04-02 20:17       ` Faraz Shahbazker
  2019-04-10 15:57         ` Nick Clifton
  1 sibling, 1 reply; 10+ messages in thread
From: Faraz Shahbazker @ 2019-04-02 20:17 UTC (permalink / raw)
  To: nickc, binutils; +Cc: Faraz Shahbazker

Add a new option to disable the listing of discarded sections
in map file output.  The use case stems from a large application
built with -ffunction-sections --gc-sections where the list of
discarded sections blows up the map file output.  The default
behaviour remains to print discarded sections,  but the new option
allows us to disable it.

ld/
	* NEWS: Mention new option --no-print-map-discarded.
	* ld.h (ld_config_type) <print_map_discarded>: New field.
	* ldlang.c (lang_map): Conditionally output discarded sections
	in map files based on configuration option.
	* ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
	OPTION_NO_PRINT_MAP_DISCARDED>: New.
	* ldmain.c (main): Enabled print_map_discarded by default.
	* lexsup.c (ld_options): Add new command-line options.
	(parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
	OPTION_PRINT_MAP_DISCARDED>: New cases.
	* ld.texi: Document new options.
	* testsuite/ld-gc/gc.exp: Add new test.
	* testsuite/ld-gc/skip-map-discarded.s: New file.
	* testsuite/ld-gc/skip-map-discarded.d: New file.
	* testsuite/ld-gc/skip-map-discarded.map: New file.
---
This is corrected version 3 of a patch posted for review few months back,
but not committed due to pending copyright assignment. Somehow managed to
reverse the previous version before posting.

 ld/NEWS                                   |  2 ++
 ld/ld.h                                   |  3 +++
 ld/ld.texi                                |  8 ++++++++
 ld/ldlang.c                               | 25 +++++++++++++------------
 ld/ldlex.h                                |  2 ++
 ld/ldmain.c                               |  1 +
 ld/lexsup.c                               | 14 ++++++++++++++
 ld/testsuite/ld-gc/gc.exp                 |  2 ++
 ld/testsuite/ld-gc/skip-map-discarded.d   |  3 +++
 ld/testsuite/ld-gc/skip-map-discarded.map |  5 +++++
 ld/testsuite/ld-gc/skip-map-discarded.s   |  5 +++++
 11 files changed, 58 insertions(+), 12 deletions(-)
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.d
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.map
 create mode 100644 ld/testsuite/ld-gc/skip-map-discarded.s

diff --git a/ld/NEWS b/ld/NEWS
index 597845a..de2cd16 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,7 @@
 -*- text -*-
 
+* Add command-line option --no-print-map-discarded.
+
 Changes in 2.33:
 
 * Add target handlers for AArch64 for ELF GNU program properties.
diff --git a/ld/ld.h b/ld/ld.h
index b97d977..55078a9 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -318,6 +318,9 @@ typedef struct
 
   /* The common page size for ELF.  */
   bfd_vma commonpagesize;
+
+  /* If set, print discarded sections in map file output.  */
+  bfd_boolean print_map_discarded;
 } ld_config_type;
 
 extern ld_config_type config;
diff --git a/ld/ld.texi b/ld/ld.texi
index 0bcbec4..d88bdb4 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -783,6 +783,14 @@ when merging properties in  @file{foo.o}, whose 0xc0010001 property value
 is 0x1, and @file{bar.o}, whose 0xc0010001 property value is 0x1.
 @end itemize
 
+@cindex link map discarded
+@kindex --print-map-discarded
+@kindex --no-print-map-discarded
+@item --print-map-discarded
+@itemx --no-print-map-discarded
+Print (or do not print) the list of discarded and garbage collected sections
+in the link map.  Enabled by default.
+
 @kindex -n
 @cindex read-only text
 @cindex NMAGIC
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 1952d4a..898735e 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2251,19 +2251,20 @@ lang_map (void)
 	  || file->flags.just_syms)
 	continue;
 
-      for (s = file->the_bfd->sections; s != NULL; s = s->next)
-	if ((s->output_section == NULL
-	     || s->output_section->owner != link_info.output_bfd)
-	    && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
-	  {
-	    if (!dis_header_printed)
-	      {
-		fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
-		dis_header_printed = TRUE;
-	      }
+      if (config.print_map_discarded)
+	for (s = file->the_bfd->sections; s != NULL; s = s->next)
+	  if ((s->output_section == NULL
+	       || s->output_section->owner != link_info.output_bfd)
+	      && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
+	    {
+	      if (! dis_header_printed)
+		{
+		  fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
+		  dis_header_printed = TRUE;
+		}
 
-	    print_input_section (s, TRUE);
-	  }
+	      print_input_section (s, TRUE);
+	    }
     }
 
   minfo (_("\nMemory Configuration\n\n"));
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 32853de..32a7a64 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -148,6 +148,8 @@ enum option_values
   OPTION_REQUIRE_DEFINED_SYMBOL,
   OPTION_ORPHAN_HANDLING,
   OPTION_FORCE_GROUP_ALLOCATION,
+  OPTION_PRINT_MAP_DISCARDED,
+  OPTION_NO_PRINT_MAP_DISCARDED,
 };
 
 /* The initial parser states.  */
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 77cdbd0..da1c6a7 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -264,6 +264,7 @@ main (int argc, char **argv)
   config.make_executable = TRUE;
   config.magic_demand_paged = TRUE;
   config.text_read_only = TRUE;
+  config.print_map_discarded = TRUE;
   link_info.disable_target_specific_optimizations = -1;
 
   command_line.warn_mismatch = TRUE;
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 88e85c7..dacb962 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -543,6 +543,12 @@ static const struct ld_option ld_options[] =
   { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
     '\0', N_("=MODE"), N_("Control how orphan sections are handled."),
     TWO_DASHES },
+  { {"print-map-discarded", no_argument, NULL, OPTION_PRINT_MAP_DISCARDED},
+    '\0', NULL, N_("Show discarded sections in map file output (default)"),
+    TWO_DASHES },
+  { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
+    '\0', NULL, N_("Do not show discarded sections in map file output"),
+    TWO_DASHES },
 };
 
 #define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1577,6 +1583,14 @@ parse_args (unsigned argc, char **argv)
 	    einfo (_("%F%P: invalid argument to option"
 		     " \"--orphan-handling\"\n"));
 	  break;
+
+	case OPTION_NO_PRINT_MAP_DISCARDED:
+	  config.print_map_discarded = FALSE;
+	  break;
+
+	case OPTION_PRINT_MAP_DISCARDED:
+	  config.print_map_discarded = TRUE;
+	  break;
 	}
     }
 
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 536356c..13968cc 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -171,3 +171,5 @@ if { [is_elf_format] && [check_shared_lib_support] \
     ]
     run_dump_test "pr20306"
 }
+
+run_dump_test "skip-map-discarded"
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.d b/ld/testsuite/ld-gc/skip-map-discarded.d
new file mode 100644
index 0000000..2e79f0b
--- /dev/null
+++ b/ld/testsuite/ld-gc/skip-map-discarded.d
@@ -0,0 +1,3 @@
+#name: Check --no-print-map-discarded linker option
+#ld: -e 0 --gc-sections --no-print-map-discarded
+#map: skip-map-discarded.map
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.map b/ld/testsuite/ld-gc/skip-map-discarded.map
new file mode 100644
index 0000000..ca4818e
--- /dev/null
+++ b/ld/testsuite/ld-gc/skip-map-discarded.map
@@ -0,0 +1,5 @@
+#failif
+Discarded input sections
+#...
+ _foo.*
+#...
diff --git a/ld/testsuite/ld-gc/skip-map-discarded.s b/ld/testsuite/ld-gc/skip-map-discarded.s
new file mode 100644
index 0000000..630aab0
--- /dev/null
+++ b/ld/testsuite/ld-gc/skip-map-discarded.s
@@ -0,0 +1,5 @@
+.globl __start
+__start:
+	.section	_foo
+foo:
+	.long	1
-- 
2.9.5

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

* Re: [PATCH v3] ld: Add --no-print-map-discarded option
  2019-04-02 20:17       ` [PATCH v3] " Faraz Shahbazker
@ 2019-04-10 15:57         ` Nick Clifton
  2019-04-10 16:19           ` Faraz Shahbazker
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Clifton @ 2019-04-10 15:57 UTC (permalink / raw)
  To: Faraz Shahbazker, binutils

Hi Faraz,

> 	* NEWS: Mention new option --no-print-map-discarded.
> 	* ld.h (ld_config_type) <print_map_discarded>: New field.
> 	* ldlang.c (lang_map): Conditionally output discarded sections
> 	in map files based on configuration option.
> 	* ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
> 	OPTION_NO_PRINT_MAP_DISCARDED>: New.
> 	* ldmain.c (main): Enabled print_map_discarded by default.
> 	* lexsup.c (ld_options): Add new command-line options.
> 	(parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
> 	OPTION_PRINT_MAP_DISCARDED>: New cases.
> 	* ld.texi: Document new options.
> 	* testsuite/ld-gc/gc.exp: Add new test.
> 	* testsuite/ld-gc/skip-map-discarded.s: New file.
> 	* testsuite/ld-gc/skip-map-discarded.d: New file.
> 	* testsuite/ld-gc/skip-map-discarded.map: New file.

> This is corrected version 3 of a patch posted for review few months back,
> but not committed due to pending copyright assignment. Somehow managed to
> reverse the previous version before posting.
 The patch looks good to me.  Once the copyright assignment is in place
please ping me and I will approve it.

Cheers
  Nick

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

* Re: [PATCH v3] ld: Add --no-print-map-discarded option
  2019-04-10 15:57         ` Nick Clifton
@ 2019-04-10 16:19           ` Faraz Shahbazker
  2019-04-11 10:54             ` Nick Clifton
  0 siblings, 1 reply; 10+ messages in thread
From: Faraz Shahbazker @ 2019-04-10 16:19 UTC (permalink / raw)
  To: Nick Clifton, binutils

Hi Nick,

I have been told that the copyright assignment from Wave Computing is in place.

Regards,
Faraz

On 4/10/19 8:57 AM, Nick Clifton wrote:
> Hi Faraz,
> 
>> 	* NEWS: Mention new option --no-print-map-discarded.
>> 	* ld.h (ld_config_type) <print_map_discarded>: New field.
>> 	* ldlang.c (lang_map): Conditionally output discarded sections
>> 	in map files based on configuration option.
>> 	* ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
>> 	OPTION_NO_PRINT_MAP_DISCARDED>: New.
>> 	* ldmain.c (main): Enabled print_map_discarded by default.
>> 	* lexsup.c (ld_options): Add new command-line options.
>> 	(parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
>> 	OPTION_PRINT_MAP_DISCARDED>: New cases.
>> 	* ld.texi: Document new options.
>> 	* testsuite/ld-gc/gc.exp: Add new test.
>> 	* testsuite/ld-gc/skip-map-discarded.s: New file.
>> 	* testsuite/ld-gc/skip-map-discarded.d: New file.
>> 	* testsuite/ld-gc/skip-map-discarded.map: New file.
> 
>> This is corrected version 3 of a patch posted for review few months back,
>> but not committed due to pending copyright assignment. Somehow managed to
>> reverse the previous version before posting.
>  The patch looks good to me.  Once the copyright assignment is in place
> please ping me and I will approve it.
> 
> Cheers
>   Nick
> 

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

* Re: [PATCH v3] ld: Add --no-print-map-discarded option
  2019-04-10 16:19           ` Faraz Shahbazker
@ 2019-04-11 10:54             ` Nick Clifton
  2019-04-11 14:05               ` Faraz Shahbazker
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Clifton @ 2019-04-11 10:54 UTC (permalink / raw)
  To: Faraz Shahbazker, binutils

Hi Faraz,

> I have been told that the copyright assignment from Wave Computing is in place.

Indeed it is,

>>> 	* NEWS: Mention new option --no-print-map-discarded.
>>> 	* ld.h (ld_config_type) <print_map_discarded>: New field.
>>> 	* ldlang.c (lang_map): Conditionally output discarded sections
>>> 	in map files based on configuration option.
>>> 	* ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
>>> 	OPTION_NO_PRINT_MAP_DISCARDED>: New.
>>> 	* ldmain.c (main): Enabled print_map_discarded by default.
>>> 	* lexsup.c (ld_options): Add new command-line options.
>>> 	(parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
>>> 	OPTION_PRINT_MAP_DISCARDED>: New cases.
>>> 	* ld.texi: Document new options.
>>> 	* testsuite/ld-gc/gc.exp: Add new test.
>>> 	* testsuite/ld-gc/skip-map-discarded.s: New file.
>>> 	* testsuite/ld-gc/skip-map-discarded.d: New file.
>>> 	* testsuite/ld-gc/skip-map-discarded.map: New file.

Patch approved - please apply.

Cheers
  Nick


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

* Re: [PATCH v3] ld: Add --no-print-map-discarded option
  2019-04-11 10:54             ` Nick Clifton
@ 2019-04-11 14:05               ` Faraz Shahbazker
  0 siblings, 0 replies; 10+ messages in thread
From: Faraz Shahbazker @ 2019-04-11 14:05 UTC (permalink / raw)
  To: Nick Clifton, binutils

Hi Nick,


I don't have write access yet. I've had maybe a handful of patches approved. Is there a threshold to meet for requesting write access?


Regards,

Faraz

________________________________
From: Nick Clifton <nickc@redhat.com>
Sent: Thursday, April 11, 2019 3:54:11 AM
To: Faraz Shahbazker; binutils@sourceware.org
Subject: Re: [PATCH v3] ld: Add --no-print-map-discarded option

Hi Faraz,

> I have been told that the copyright assignment from Wave Computing is in place.

Indeed it is,

>>>      * NEWS: Mention new option --no-print-map-discarded.
>>>      * ld.h (ld_config_type) <print_map_discarded>: New field.
>>>      * ldlang.c (lang_map): Conditionally output discarded sections
>>>      in map files based on configuration option.
>>>      * ldlex.h (option_values) <OPTION_PRINT_MAP_DISCARDED,
>>>      OPTION_NO_PRINT_MAP_DISCARDED>: New.
>>>      * ldmain.c (main): Enabled print_map_discarded by default.
>>>      * lexsup.c (ld_options): Add new command-line options.
>>>      (parse_args) <OPTION_NO_PRINT_MAP_DISCARDED,
>>>      OPTION_PRINT_MAP_DISCARDED>: New cases.
>>>      * ld.texi: Document new options.
>>>      * testsuite/ld-gc/gc.exp: Add new test.
>>>      * testsuite/ld-gc/skip-map-discarded.s: New file.
>>>      * testsuite/ld-gc/skip-map-discarded.d: New file.
>>>      * testsuite/ld-gc/skip-map-discarded.map: New file.

Patch approved - please apply.

Cheers
  Nick


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

end of thread, other threads:[~2019-04-11 14:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 16:03 [RFC] [PATCH] ld: Add --no-print-map-discarded option fshahbazker
2018-08-01 14:56 ` Nick Clifton
2018-08-01 15:04   ` Faraz Shahbazker
2018-08-01 16:01     ` Nick Clifton
2019-04-02 19:58       ` [PATCH v2] " Faraz Shahbazker
2019-04-02 20:17       ` [PATCH v3] " Faraz Shahbazker
2019-04-10 15:57         ` Nick Clifton
2019-04-10 16:19           ` Faraz Shahbazker
2019-04-11 10:54             ` Nick Clifton
2019-04-11 14:05               ` Faraz Shahbazker

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).