Allow objcopy's --set-section-flags options to add or remove the SHF_EXCLUDE flag...
authorFangrui Song <maskray@google.com>
Mon, 10 Feb 2020 16:22:00 +0000 (16:22 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 10 Feb 2020 16:22:00 +0000 (16:22 +0000)
* objcopy.c (parse_flags): Handle "exclude".
* doc/binutils.texi: Document the support.

binutils/ChangeLog
binutils/doc/binutils.texi
binutils/objcopy.c

index fc3783e85161916774e5893bfe62ab34c96a0844..06bbf5d6b7797b9794791699325d1e8b5c7ba7f8 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-10  Fangrui Song   <maskray@google.com>
+
+       * objcopy.c (parse_flags): Handle "exclude".
+       * doc/binutils.texi: Document the support.
+
 2020-02-10  Aaron Merey  <amerey@redhat.com>
 
        * binutils/testsuite/binutils-all/debuginfod.exp:
index 669bee968f13e804f2f65f063ab1a8803947b311..289d7b14a3a661bde493c2f7202a2bdb48e42d56 100644 (file)
@@ -1644,10 +1644,10 @@ Set the flags for any sections matching @var{sectionpattern}.  The
 @var{flags} argument is a comma separated string of flag names.  The
 recognized names are @samp{alloc}, @samp{contents}, @samp{load},
 @samp{noload}, @samp{readonly}, @samp{code}, @samp{data}, @samp{rom},
-@samp{share}, and @samp{debug}.  You can set the @samp{contents} flag
-for a section which does not have contents, but it is not meaningful
-to clear the @samp{contents} flag of a section which does have
-contents--just remove the section instead.  Not all flags are
+@samp{exclude}, @samp{share}, and @samp{debug}.  You can set the
+@samp{contents} flag for a section which does not have contents, but it
+is not meaningful to clear the @samp{contents} flag of a section which
+does have contents--just remove the section instead.  Not all flags are
 meaningful for all object file formats.
 
 @item --set-section-alignment @var{sectionpattern}=@var{align}
index 212e25144e6cf914d4aa889828270b92cc82b20c..fd94d63773e9b8ee4b73358c38987e7ddee7bd7d 100644 (file)
@@ -780,6 +780,7 @@ parse_flags (const char *s)
       PARSE_FLAG ("code", SEC_CODE);
       PARSE_FLAG ("data", SEC_DATA);
       PARSE_FLAG ("rom", SEC_ROM);
+      PARSE_FLAG ("exclude", SEC_EXCLUDE);
       PARSE_FLAG ("share", SEC_COFF_SHARED);
       PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
       PARSE_FLAG ("merge", SEC_MERGE);
@@ -794,7 +795,7 @@ parse_flags (const char *s)
          copy[len] = '\0';
          non_fatal (_("unrecognized section flag `%s'"), copy);
          fatal (_("supported flags: %s"),
-                "alloc, load, noload, readonly, debug, code, data, rom, share, contents, merge, strings");
+                "alloc, load, noload, readonly, debug, code, data, rom, exclude, share, contents, merge, strings");
        }
 
       s = snext;
This page took 0.029363 seconds and 4 git commands to generate.