From 3994e2c66d792e3ea0f48d1cf039a022a62960bb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 12 Sep 1999 18:33:05 +0000 Subject: [PATCH] 1999-09-12 Donn Terry * objcopy.c (parse_flags): Handle "noload", "debug", and "share". * binutils.texi, objcopy.1: Document new flags. --- binutils/ChangeLog | 3 +++ binutils/binutils.texi | 13 +++++++------ binutils/objcopy.1 | 8 ++++---- binutils/objcopy.c | 5 ++++- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3c48546..8010b83 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,8 @@ 1999-09-12 Donn Terry + * objcopy.c (parse_flags): Handle "noload", "debug", and "share". + * binutils.texi, objcopy.1: Document new flags. + * ar.c (counted_name_mode): New static variable. (counted_name_counter): New static variable. (map_over_members): Handle counted mode. diff --git a/binutils/binutils.texi b/binutils/binutils.texi index b08776b..a20909f 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -1095,12 +1095,13 @@ if the named section does not exist. @item --set-section-flags @var{section}=@var{flags} Set the flags for the named section. The @var{flags} argument is a comma separated string of flag names. The recognized names are -@samp{alloc}, @samp{contents}, @samp{load}, @samp{readonly}, -@samp{code}, @samp{data}, and @samp{rom}. 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. +@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 meaningful for all object file +formats. @item --add-section @var{sectionname}=@var{filename} Add a new section named @var{sectionname} while copying the file. The diff --git a/binutils/objcopy.1 b/binutils/objcopy.1 index 68b98d3..b3fa296 100644 --- a/binutils/objcopy.1 +++ b/binutils/objcopy.1 @@ -1,6 +1,6 @@ .\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH objcopy 1 "October 1994" "cygnus support" "GNU Development Tools" +.TH objcopy 1 "1999" "Cygnus Solutions" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -249,9 +249,9 @@ if the named section does not exist. .B \fB\-\-set\-section\-flags=\fIsection=flags Set the flags for the named section. The \fIflags\fP argument is a comma separated string of flag names. The recognized names are -\fIalloc\fP, \fIload\fP, \fIreadonly\fP, \fIcode\fP, \fIdata\fP, and -\fIrom\fP. Not all flags are meaningful for all object file -formats. +\fIalloc\fP, \fIcontents\fP, \fIload\fP, \fInoload\fP, \fIreadonly\fP, +\fIcode\fP, \fIdata\fP, \fIrom\fP, \fIshare\fP, and \fIdebug\fP. Not +all flags are meaningful for all object file formats. .TP .B \fB\-\-add\-section=\fIsectionname=filename Add a new section named \fIsectionname\fR while copying the file. The diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 6137f11..f2455ba 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -372,10 +372,13 @@ parse_flags (s) else if (strncasecmp (fname, s, len) == 0) ret |= fval PARSE_FLAG ("alloc", SEC_ALLOC); PARSE_FLAG ("load", SEC_LOAD); + PARSE_FLAG ("noload", SEC_NEVER_LOAD); PARSE_FLAG ("readonly", SEC_READONLY); + PARSE_FLAG ("debug", SEC_DEBUGGING); PARSE_FLAG ("code", SEC_CODE); PARSE_FLAG ("data", SEC_DATA); PARSE_FLAG ("rom", SEC_ROM); + PARSE_FLAG ("share", SEC_SHARED); PARSE_FLAG ("contents", SEC_HAS_CONTENTS); #undef PARSE_FLAG else @@ -386,7 +389,7 @@ parse_flags (s) strncpy (copy, s, len); copy[len] = '\0'; non_fatal (_("unrecognized section flag `%s'"), copy); - fatal (_("supported flags: alloc, load, readonly, code, data, rom, contents")); + fatal (_("supported flags: alloc, load, noload, readonly, debug, code, data, rom, share, contents")); } s = snext; -- 2.7.4