From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19511 invoked by alias); 11 Jun 2009 19:51:20 -0000 Received: (qmail 19502 invoked by uid 22791); 11 Jun 2009 19:51:20 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 19:51:14 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MEqIp-0006rq-ET for gdb-patches@sources.redhat.com; Thu, 11 Jun 2009 19:51:11 +0000 Received: from entropy.qnx.com ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2009 19:51:11 +0000 Received: from aristovski by entropy.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2009 19:51:11 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: [patch] nto target: code cleanup #2 Date: Thu, 11 Jun 2009 19:51:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070300020802070307020108" User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00316.txt.bz2 This is a multi-part message in MIME format. --------------070300020802070307020108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 252 Hello, Similar to the previous patch, removing unnecessary indirections. Thanks, -- Aleksandar Ristovski QNX Software Systems ChangeLog: * i386-nto-tdep.c (i386nto_init_abi): Remove nto_svr4_so_ops. Initialize solib ops direcly and set them. --------------070300020802070307020108 Content-Type: text/x-patch; name="i386-nto-tdep.c-removento_svr4_so_ops-20090611.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="i386-nto-tdep.c-removento_svr4_so_ops-20090611.diff" Content-length: 1937 Index: gdb/i386-nto-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-nto-tdep.c,v retrieving revision 1.34 diff -u -p -r1.34 i386-nto-tdep.c --- gdb/i386-nto-tdep.c 11 Jun 2009 19:29:00 -0000 1.34 +++ gdb/i386-nto-tdep.c 11 Jun 2009 19:49:53 -0000 @@ -322,7 +322,6 @@ static void i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - static struct target_so_ops nto_svr4_so_ops; /* Deal with our strange signals. */ nto_initialize_signals (); @@ -349,25 +348,16 @@ i386nto_init_abi (struct gdbarch_info in set_solib_svr4_fetch_link_map_offsets (gdbarch, svr4_ilp32_fetch_link_map_offsets); - /* Initialize this lazily, to avoid an initialization order - dependency on solib-svr4.c's _initialize routine. */ - if (nto_svr4_so_ops.in_dynsym_resolve_code == NULL) - { - nto_svr4_so_ops = svr4_so_ops; - - /* Our loader handles solib relocations differently than svr4. */ - nto_svr4_so_ops.relocate_section_addresses - = nto_relocate_section_addresses; - - /* Supply a nice function to find our solibs. */ - nto_svr4_so_ops.find_and_open_solib - = nto_find_and_open_solib; - - /* Our linker code is in libc. */ - nto_svr4_so_ops.in_dynsym_resolve_code - = nto_in_dynsym_resolve_code; - } - set_solib_ops (gdbarch, &nto_svr4_so_ops); + /* Our loader handles solib relocations differently than svr4. */ + svr4_so_ops.relocate_section_addresses = nto_relocate_section_addresses; + + /* Supply a nice function to find our solibs. */ + svr4_so_ops.find_and_open_solib = nto_find_and_open_solib; + + /* Our linker code is in libc. */ + svr4_so_ops.in_dynsym_resolve_code = nto_in_dynsym_resolve_code; + + set_solib_ops (gdbarch, &svr4_so_ops); } /* Provide a prototype to silence -Wmissing-prototypes. */ --------------070300020802070307020108--