aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-02-10 16:22:00 +0000
committerNick Clifton <nickc@redhat.com>2020-02-10 16:22:00 +0000
commit3a5d12fbb4f7888525978f9fba46b977afabe391 (patch)
tree78ab7e8fb6f09ab337aaac2eeb44f3ef0eb824f4 /binutils/objcopy.c
parent46471187e440135c1f6e6b2c06df2139b61dfea2 (diff)
downloadgdb-3a5d12fbb4f7888525978f9fba46b977afabe391.zip
gdb-3a5d12fbb4f7888525978f9fba46b977afabe391.tar.gz
gdb-3a5d12fbb4f7888525978f9fba46b977afabe391.tar.bz2
Allow objcopy's --set-section-flags options to add or remove the SHF_EXCLUDE flag of ELF sections.
* objcopy.c (parse_flags): Handle "exclude". * doc/binutils.texi: Document the support.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 212e251..fd94d63 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -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;