public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix (most) OpenBSD link errors
@ 2019-11-22 17:07 Christian Biesinger via gdb-patches
  2019-12-04 21:05 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-11-22 17:07 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

This fixes these errors:
ld: error: undefined symbol: x86_stopped_by_hw_breakpoint()
>>> referenced by x86-nat.h:109 (../../gdb/x86-nat.h:109)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::stopped_by_hw_breakpoint())

ld: error: undefined symbol: x86_can_use_hw_breakpoint(bptype, int, int)
>>> referenced by x86-nat.h:76 (../../gdb/x86-nat.h:76)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::can_use_hw_breakpoint(bptype, int, int))

ld: error: undefined symbol: x86_insert_hw_breakpoint(gdbarch*, bp_target_info*)
>>> referenced by x86-nat.h:93 (../../gdb/x86-nat.h:93)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::insert_hw_breakpoint(gdbarch*, bp_target_info*))

ld: error: undefined symbol: x86_remove_hw_breakpoint(gdbarch*, bp_target_info*)
>>> referenced by x86-nat.h:97 (../../gdb/x86-nat.h:97)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::remove_hw_breakpoint(gdbarch*, bp_target_info*))

ld: error: undefined symbol: x86_remove_watchpoint(unsigned long, int, target_hw_bp_type, expression*)
>>> referenced by x86-nat.h:89 (../../gdb/x86-nat.h:89)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::remove_watchpoint(unsigned long, int, target_hw_bp_type, expression*))

ld: error: undefined symbol: x86_insert_watchpoint(unsigned long, int, target_hw_bp_type, expression*)
>>> referenced by x86-nat.h:84 (../../gdb/x86-nat.h:84)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::insert_watchpoint(unsigned long, int, target_hw_bp_type, expression*))

ld: error: undefined symbol: x86_stopped_by_watchpoint()
>>> referenced by x86-nat.h:100 (../../gdb/x86-nat.h:100)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::stopped_by_watchpoint())

ld: error: undefined symbol: x86_stopped_data_address(unsigned long*)
>>> referenced by x86-nat.h:103 (../../gdb/x86-nat.h:103)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::stopped_data_address(unsigned long*))

ld: error: undefined symbol: x86_region_ok_for_hw_watchpoint(unsigned long, int)
>>> referenced by x86-nat.h:79 (../../gdb/x86-nat.h:79)
>>>               amd64-obsd-nat.o:(x86_nat_target<obsd_nat_target>::region_ok_for_hw_watchpoint(unsigned long, int))

and

ld: error: undefined symbol: x86_dr_insert_watchpoint(x86_debug_reg_state*, target_hw_bp_type, unsigned long, int)
>>> referenced by x86-nat.c:156 (../../gdb/x86-nat.c:156)
>>>               x86-nat.o:(x86_insert_watchpoint(unsigned long, int, target_hw_bp_type, expression*))

ld: error: undefined symbol: x86_dr_remove_watchpoint(x86_debug_reg_state*, target_hw_bp_type, unsigned long, int)
>>> referenced by x86-nat.c:169 (../../gdb/x86-nat.c:169)
>>>               x86-nat.o:(x86_remove_watchpoint(unsigned long, int, target_hw_bp_type, expression*))

ld: error: undefined symbol: x86_dr_region_ok_for_watchpoint(x86_debug_reg_state*, unsigned long, int)
>>> referenced by x86-nat.c:181 (../../gdb/x86-nat.c:181)
>>>               x86-nat.o:(x86_region_ok_for_hw_watchpoint(unsigned long, int))

ld: error: undefined symbol: x86_dr_stopped_data_address(x86_debug_reg_state*, unsigned long*)
>>> referenced by x86-nat.c:194 (../../gdb/x86-nat.c:194)
>>>               x86-nat.o:(x86_stopped_data_address(unsigned long*))

ld: error: undefined symbol: x86_dr_stopped_by_watchpoint(x86_debug_reg_state*)
>>> referenced by x86-nat.c:206 (../../gdb/x86-nat.c:206)
>>>               x86-nat.o:(x86_stopped_by_watchpoint())

ld: error: undefined symbol: x86_dr_insert_watchpoint(x86_debug_reg_state*, target_hw_bp_type, unsigned long, int)
>>> referenced by x86-nat.c:219 (../../gdb/x86-nat.c:219)
>>>               x86-nat.o:(x86_insert_hw_breakpoint(gdbarch*, bp_target_info*))

ld: error: undefined symbol: x86_dr_remove_watchpoint(x86_debug_reg_state*, target_hw_bp_type, unsigned long, int)
>>> referenced by x86-nat.c:233 (../../gdb/x86-nat.c:233)
>>>               x86-nat.o:(x86_remove_hw_breakpoint(gdbarch*, bp_target_info*))

ld: error: undefined symbol: x86_dr_stopped_by_hw_breakpoint(x86_debug_reg_state*)
>>> referenced by x86-nat.c:269 (../../gdb/x86-nat.c:269)
>>>               x86-nat.o:(x86_stopped_by_hw_breakpoint())

It does not fix:
ld: error: can't create dynamic relocation R_X86_64_64 against symbol: __gmp_binvert_limb_table in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/local/lib/libgmp.a(mp_minv_tab.o)
>>> referenced by tmp-dive_1.s
>>>               dive_1.o:(__gmpn_divexact_1) in archive /usr/local/lib/libgmp.a

ld: error: can't create dynamic relocation R_X86_64_64 against symbol: __gmp_binvert_limb_table in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/local/lib/libgmp.a(mp_minv_tab.o)
>>> referenced by tmp-bdiv_q_1.s
>>>               bdiv_q_1.o:(__gmpn_bdiv_q_1) in archive /usr/local/lib/libgmp.a

ld: error: can't create dynamic relocation R_X86_64_64 against symbol: __gmpn_invert_limb_table in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/local/lib/libgmp.a(invert_limb_table.o)
>>> referenced by tmp-invert_limb.s
>>>               invert_limb.o:(__gmpn_invert_limb) in archive /usr/local/lib/libgmp.a

gdb/ChangeLog:

2019-11-22  Christian Biesinger  <cbiesinger@google.com>

	* configure.nat (obsd64): Add missing files x86-nat.o and
	nat/x86-dregs.o.

Change-Id: I4a443c0cf805efd7b45feaabd729a01b07772724
---
 gdb/configure.nat | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gdb/configure.nat b/gdb/configure.nat
index 77a2ee8083..9033936781 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -445,8 +445,9 @@ case ${gdb_host} in
 	case ${gdb_host_cpu} in
 	    i386)
 		# Host: OpenBSD/amd64
-		NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
-		x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
+		NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o x86-nat.o \
+		x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o \
+		nat/x86-dregs.o"
 		LOADLIBES='-lkvm'
 		;;
 	    mips)

base-commit: f10ffa4146416f1fb11ae1bc1a1c423d49e2dbf0
-- 
2.24.0.432.g9d3f5f5b63-goog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix (most) OpenBSD link errors
  2019-11-22 17:07 [PATCH] Fix (most) OpenBSD link errors Christian Biesinger via gdb-patches
@ 2019-12-04 21:05 ` Tom Tromey
  2019-12-04 22:17   ` Christian Biesinger via gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2019-12-04 21:05 UTC (permalink / raw)
  To: Christian Biesinger via gdb-patches; +Cc: Christian Biesinger

>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:

I didn't see a reply to this one.

Christian> 2019-11-22  Christian Biesinger  <cbiesinger@google.com>

Christian> 	* configure.nat (obsd64): Add missing files x86-nat.o and
Christian> 	nat/x86-dregs.o.

Looks good, thank you.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix (most) OpenBSD link errors
  2019-12-04 21:05 ` Tom Tromey
@ 2019-12-04 22:17   ` Christian Biesinger via gdb-patches
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-04 22:17 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches

On Wed, Dec 4, 2019 at 3:05 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> I didn't see a reply to this one.

Yep, there wasn't one, and it didn't reach the two weeks timeframe for
pinging yet.

> Christian> 2019-11-22  Christian Biesinger  <cbiesinger@google.com>
>
> Christian>      * configure.nat (obsd64): Add missing files x86-nat.o and
> Christian>      nat/x86-dregs.o.
>
> Looks good, thank you.

Thank you, pushed.

Christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-04 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 17:07 [PATCH] Fix (most) OpenBSD link errors Christian Biesinger via gdb-patches
2019-12-04 21:05 ` Tom Tromey
2019-12-04 22:17   ` Christian Biesinger via gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).