mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-12 02:17:45 +08:00
Add --srec-len and --srec-forceS3 switches to objcopy
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
2000-10-06 Luciano Gemme <ishitawa@yahoo.com>
|
||||
|
||||
* objcopy.c (--srec-len=nn): New parameter to set the
|
||||
maximum length of generated Srecords.
|
||||
(--srec-forceS3): New parameter that restricts the generation of
|
||||
Srecords to type S3 only.
|
||||
|
||||
2000-10-31 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* MAINTAINERS: Add Jim Wilson as the maintainer for the IA64
|
||||
|
@ -1,5 +1,8 @@
|
||||
-*- text -*-
|
||||
|
||||
* Add --srec-len and --srec-forceS3 command line switch to objcopy. By Luciano
|
||||
Gemme.
|
||||
|
||||
* Support for the MIPS32, by Anders Norlander.
|
||||
|
||||
* Support for the i860, by Jason Eckhardt.
|
||||
|
@ -899,6 +899,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
|
||||
[ --set-section-flags @var{section}=@var{flags} ]
|
||||
[ --add-section @var{sectionname}=@var{filename} ]
|
||||
[ --change-leading-char ] [ --remove-leading-char ]
|
||||
[ --srec-len=@var{ival} ] [ --srec-forceS3 ]
|
||||
[ --redefine-sym @var{old}=@var{new} ] [ --weaken ]
|
||||
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
||||
@var{infile} [@var{outfile}]
|
||||
@ -1154,6 +1155,15 @@ different conventions for symbol names. This is different from
|
||||
when appropriate, regardless of the object file format of the output
|
||||
file.
|
||||
|
||||
@item --srec-len=@var{ival}
|
||||
Meaningful only for srec output. Set the maximum length of the Srecords
|
||||
being produced to @var{ival}. This length covers both address, data and
|
||||
crc fields.
|
||||
|
||||
@item --srec-forceS3
|
||||
Meaningful only for srec output. Avoid generation of S1/S2 records,
|
||||
creating S3-only record format.
|
||||
|
||||
@item --redefine-sym @var{old}=@var{new}
|
||||
Change the name of a symbol @var{old}, to @var{new}. This can be useful
|
||||
when one is trying link two things together for which you have no
|
||||
|
@ -47,6 +47,8 @@ objcopy \- copy and translate object files
|
||||
.RB "[\|" \-\-add\-section\ \fIsectionname=filename\fR "\|]"
|
||||
.RB "[\|" \-\-change\-leading\-char\fR "\|]"
|
||||
.RB "[\|" \-\-remove\-leading\-char\fR "\|]"
|
||||
.RB "[\|" \-\-srec\-len=\fIval\fR "\|]"
|
||||
.RB "[\|" \-\-srec\-forceS3\fR "\|]"
|
||||
.RB "[\|" \-\-redefine\-sym\ \fIold=new\fR "\|]"
|
||||
.RB "[\|" \-\-weaken\fR "\|]"
|
||||
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
|
||||
@ -282,6 +284,14 @@ with different conventions for symbol names. This is different from
|
||||
\fB\-\-change\-leading\-char\fP because it always changes the symbol name
|
||||
when appropriate, regardless of the object file format of the output
|
||||
.TP
|
||||
.B \fB\-\-srec\-len=\fIval
|
||||
Meaningful only for srec output. Set the length of the Srecords to \fIval\fP.
|
||||
This length covers both the address, data and crc fields.
|
||||
.TP
|
||||
.B \fB\-\-srec\-forceS3
|
||||
Meaningful only for srec output. Avoid generation of S1/S2 records, creating
|
||||
S3-only record format.
|
||||
.TP
|
||||
.B \-\-redefine\-sym\ \fIold=new
|
||||
Change the name of symbol \fIold\fR to \fInew\fR. This can be useful
|
||||
when one is trying link two things together for which you have no
|
||||
|
@ -215,6 +215,8 @@ static boolean weaken = false;
|
||||
#define OPTION_STRIP_UNNEEDED (OPTION_SET_START + 1)
|
||||
#define OPTION_WEAKEN (OPTION_STRIP_UNNEEDED + 1)
|
||||
#define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1)
|
||||
#define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1)
|
||||
#define OPTION_SREC_FORCES3 (OPTION_SREC_LEN + 1)
|
||||
|
||||
/* Options to handle if running as "strip". */
|
||||
|
||||
@ -290,6 +292,8 @@ static struct option copy_options[] =
|
||||
{"weaken", no_argument, 0, OPTION_WEAKEN},
|
||||
{"weaken-symbol", required_argument, 0, 'W'},
|
||||
{"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM},
|
||||
{"srec-len", required_argument, 0, OPTION_SREC_LEN},
|
||||
{"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3},
|
||||
{0, no_argument, 0, 0}
|
||||
};
|
||||
|
||||
@ -301,6 +305,14 @@ extern char *program_name;
|
||||
-1 means if we should use argv[0] to decide. */
|
||||
extern int is_strip;
|
||||
|
||||
/* The maximum length of an S record. This variable is declared in srec.c
|
||||
and can be modified by the --srec-len parameter. */
|
||||
extern unsigned int Chunk;
|
||||
|
||||
/* Restrict the generation of Srecords to type S3 only.
|
||||
This variable is declare in bfd/srec.c and can be toggled
|
||||
on by the --srec-forceS3 command line switch. */
|
||||
extern boolean S3Forced;
|
||||
|
||||
static void
|
||||
copy_usage (stream, exit_status)
|
||||
@ -350,6 +362,8 @@ copy_usage (stream, exit_status)
|
||||
--change-leading-char Force output format's leading character style\n\
|
||||
--remove-leading-char Remove leading character from global symbols\n\
|
||||
--redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
|
||||
--srec-len <number> Restrict the length of generated Srecords\n\
|
||||
--srec-forceS3 Restrict the type of generated Srecords to S3\n\
|
||||
-v --verbose List all object files modified\n\
|
||||
-V --version Display this program's version number\n\
|
||||
-h --help Display this output\n\
|
||||
@ -2129,6 +2143,14 @@ copy_main (argc, argv)
|
||||
set_start_set = true;
|
||||
break;
|
||||
|
||||
case OPTION_SREC_LEN:
|
||||
Chunk = parse_vma (optarg, "--srec-len");
|
||||
break;
|
||||
|
||||
case OPTION_SREC_FORCES3:
|
||||
S3Forced = true;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break; /* we've been given a long option */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user