bfd: Rename Chunk and S3Forced

The direct references in objcopy kind of look like a hack to me, so
I'm calling these symbols internal too.  Certainly they aren't named
and documented as a public BFD symbol today anyway.

So ... give these bfd-internal symbols with external linkage a _bfd_
prefix to avoid collisions in the global symbol namespace.

While at it, give them names that more closely match the corresponding
option name that toggles them.

Also while at it, fix a few related comment typos.

gdb/ChangeLog:
2017-02-17  Pedro Alves  <palves@redhat.com>

	* srec.c (Chunk): Rename to ...
	(_bfd_srec_len): ... this.
	(S3Forced): Rename to ...
	(_bfd_srec_forceS3): ... this.
	* objcopy.c: Adjust all references.
This commit is contained in:
Pedro Alves 2017-02-17 01:26:12 +00:00
parent 7ec22e0f1e
commit 4bc26c6959
3 changed files with 25 additions and 17 deletions

View file

@ -491,14 +491,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
/* The maximum length of an S record. This variable is defined in srec.c
and can be modified by the --srec-len parameter. */
extern unsigned int Chunk;
extern unsigned int _bfd_srec_len;
/* Restrict the generation of Srecords to type S3 only.
This variable is declare in bfd/srec.c and can be toggled
This variable is defined in bfd/srec.c and can be toggled
on by the --srec-forceS3 command line switch. */
extern bfd_boolean S3Forced;
extern bfd_boolean _bfd_srec_forceS3;
/* Forward declarations. */
static void setup_section (bfd *, asection *, void *);
@ -4509,11 +4509,11 @@ copy_main (int argc, char *argv[])
break;
case OPTION_SREC_LEN:
Chunk = parse_vma (optarg, "--srec-len");
_bfd_srec_len = parse_vma (optarg, "--srec-len");
break;
case OPTION_SREC_FORCES3:
S3Forced = TRUE;
_bfd_srec_forceS3 = TRUE;
break;
case OPTION_STRIP_SYMBOLS: