[FYI] make exec_ops static

Message ID 1405699407-32457-1-git-send-email-tromey@redhat.com
State Committed
Headers

Commit Message

Tom Tromey July 18, 2014, 4:03 p.m. UTC
  While working on some target stack changes, I noticed that exec_ops is
only used from exec.c.  This patch makes it "static".  This is cleaner
and makes it simpler to reason about the use of the target.

Tested by rebuilding.
I'm checking this in as obvious.

2014-07-18  Tom Tromey  <tromey@redhat.com>

	* exec.c (exec_ops): Now static.
	* exec.h (exec_ops): Don't declare.
---
 gdb/ChangeLog | 5 +++++
 gdb/exec.c    | 2 +-
 gdb/exec.h    | 2 --
 3 files changed, 6 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/exec.c b/gdb/exec.c
index 5176bf1..7ba2720 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -61,7 +61,7 @@  void _initialize_exec (void);
 
 /* The target vector for executable files.  */
 
-struct target_ops exec_ops;
+static struct target_ops exec_ops;
 
 /* True if the exec target is pushed on the stack.  */
 static int using_exec_ops;
diff --git a/gdb/exec.h b/gdb/exec.h
index 304310f..1d77e24 100644
--- a/gdb/exec.h
+++ b/gdb/exec.h
@@ -29,8 +29,6 @@  struct target_ops;
 struct bfd;
 struct objfile;
 
-extern struct target_ops exec_ops;
-
 #define exec_bfd current_program_space->ebfd
 #define exec_bfd_mtime current_program_space->ebfd_mtime
 #define exec_filename current_program_space->pspace_exec_filename