diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2020-06-25 13:54:42 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2020-06-25 13:54:42 +0200 |
commit | a7e6196bb886ff17d0c87650b6f458d5366122ac (patch) | |
tree | d262e9083140449a0b3fce60af59fe1c0da5a8dc | |
parent | d412e69677c6ca145ea8f5ff8c61a22952cb0855 (diff) | |
download | gdb-a7e6196bb886ff17d0c87650b6f458d5366122ac.zip gdb-a7e6196bb886ff17d0c87650b6f458d5366122ac.tar.gz gdb-a7e6196bb886ff17d0c87650b6f458d5366122ac.tar.bz2 |
Don't include *sol2-tdep.o on Linux/sparc*
Linux/sparc* currently links Solaris-specific files (sparc-sol2-tdep.o,
sparc64-sol2-tdep.o, sol2-tdep.o) for no apparent reason. It has no
business doing so, and none of the functions/variables defined there are
used explicitly. If support for the Solaris OSABI were desired, this
should be done using --enable-targets instead.
Since neither sparc{32,64}_sol2_init_abi currently declared in common
headers (sparc*-tdep.h) are used outside their source files, they are made
static and the declarations removed.
Tested on sparcv9-sun-solaris2.11 and sparc64-unknown-linux-gnu.
* configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
<sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
sol2-tdep.o, sparc-sol2-tdep.o.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
* sparc-tdep.h (sparc32_sol2_init_abi): Remove.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
* sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/configure.tgt | 8 | ||||
-rw-r--r-- | gdb/sparc-sol2-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc-tdep.h | 3 | ||||
-rw-r--r-- | gdb/sparc64-sol2-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc64-tdep.h | 3 |
6 files changed, 17 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0799ec3..7298617 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove + sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o. + <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o, + sol2-tdep.o, sparc-sol2-tdep.o. + * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static. + * sparc-tdep.h (sparc32_sol2_init_abi): Remove. + * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static. + * sparc64-tdep.h (sparc64_sol2_init_abi): Remove. + +2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove. (amd64_sol2_init_abi): Use sol2_sigtramp_p. Call sol2_init_abi. diff --git a/gdb/configure.tgt b/gdb/configure.tgt index b3f31af..d66f01b 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -585,20 +585,20 @@ sh*) sparc-*-linux*) # Target: GNU/Linux SPARC - gdb_target_obs="sparc-tdep.o sparc-sol2-tdep.o sol2-tdep.o \ + gdb_target_obs="sparc-tdep.o \ sparc-linux-tdep.o solib-svr4.o symfile-mem.o \ linux-tdep.o \ ravenscar-thread.o sparc-ravenscar-thread.o" if test "x$enable_64_bit_bfd" = "xyes"; then # Target: GNU/Linux UltraSPARC - gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o \ + gdb_target_obs="sparc64-tdep.o \ sparc64-linux-tdep.o ${gdb_target_obs}" fi ;; sparc64-*-linux*) # Target: GNU/Linux UltraSPARC - gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o sol2-tdep.o \ - sparc64-linux-tdep.o sparc-tdep.o sparc-sol2-tdep.o \ + gdb_target_obs="sparc64-tdep.o \ + sparc64-linux-tdep.o sparc-tdep.o \ sparc-linux-tdep.o solib-svr4.o linux-tdep.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c index dfd6e34..1c61ecc 100644 --- a/gdb/sparc-sol2-tdep.c +++ b/gdb/sparc-sol2-tdep.c @@ -192,7 +192,7 @@ static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind = -void +static void sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index 59eaf29..625b3e8 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -245,9 +245,6 @@ extern int sparc_is_annulled_branch_insn (CORE_ADDR pc); extern const struct sparc_gregmap sparc32_sol2_gregmap; extern const struct sparc_fpregmap sparc32_sol2_fpregmap; -extern void sparc32_sol2_init_abi (struct gdbarch_info info, - struct gdbarch *gdbarch); - /* Functions and variables exported from sparcnbsd-tdep.c. */ /* Register offsets for NetBSD. */ diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c index 31ee873..824444d 100644 --- a/gdb/sparc64-sol2-tdep.c +++ b/gdb/sparc64-sol2-tdep.c @@ -195,7 +195,7 @@ static const struct frame_unwind sparc64_sol2_sigtramp_frame_unwind = -void +static void sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/sparc64-tdep.h b/gdb/sparc64-tdep.h index 614160e..d3ba9e2 100644 --- a/gdb/sparc64-tdep.h +++ b/gdb/sparc64-tdep.h @@ -119,9 +119,6 @@ extern void sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap, extern const struct sparc_gregmap sparc64_sol2_gregmap; extern const struct sparc_fpregmap sparc64_sol2_fpregmap; -extern void sparc64_sol2_init_abi (struct gdbarch_info info, - struct gdbarch *gdbarch); - /* Variables exported from sparc64-fbsd-tdep.c. */ /* Register offsets for FreeBSD/sparc64. */ |