From patchwork Fri Nov 22 17:07:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 36122 Received: (qmail 114135 invoked by alias); 22 Nov 2019 17:07:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 114127 invoked by uid 89); 22 Nov 2019 17:07:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=amd64 X-HELO: mail-qv1-f74.google.com Received: from mail-qv1-f74.google.com (HELO mail-qv1-f74.google.com) (209.85.219.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Nov 2019 17:07:21 +0000 Received: by mail-qv1-f74.google.com with SMTP id a4so5066040qvz.20 for ; Fri, 22 Nov 2019 09:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=WMWE6OHsX08R9tX2gVUdk4I+IyebLV8spwlPQtyZ/7w=; b=tgJ8rwrGa8zAKhmr6jIB+G6bqpgf/IeE3hxe/X8znp7/2fuIrI97DfwvEqEW5OmASP eJaWj0olg3nWx5gmcc2WjBU/TBF8MflZ+jXPcmpXEEq+V+OZ9Im00t6MpawX73oNoMiD 7D17ICUnswcgMDLikcBgLvEBZtiwTZW77GbGkMUg4D9w+TmVyZxR+K73FJI2wXdJTYeL XQJ/cpp8deqIe134MFDuv0CzquGOc3OWg5t4RuIampMMhwxDjmQJdLz4jKzlT7dhf985 9OMXWfkBHHFdZW8sLtsLkDVSvHKaRfJ3RGn14Bz7s1WtarERwaqeKz5nwY/WHz6njFVI 99iw== Date: Fri, 22 Nov 2019 11:07:16 -0600 Message-Id: <20191122170716.223190-1-cbiesinger@google.com> Mime-Version: 1.0 Subject: [PATCH] Fix (most) OpenBSD link errors X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger To: gdb-patches@sourceware.org Cc: Christian Biesinger X-IsSubscribed: yes 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::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::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::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::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::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::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::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::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::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 * 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(-) base-commit: f10ffa4146416f1fb11ae1bc1a1c423d49e2dbf0 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)