From patchwork Thu Apr 3 01:06:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 392 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 573B3360075 for ; Wed, 2 Apr 2014 18:07:14 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id 15129622CB1B4; Wed, 2 Apr 2014 18:07:13 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id BAA70622CFDA3 for ; Wed, 2 Apr 2014 18:07:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=XSa0 3RLpf3E18xpGHuALCKJ6nsFx5RDpWY1W2vs+YukEPZAGpZfK+QoQLuM2vAYawuub lQdvs7hidLQxO1iNlF1KijmqYgRAugVtMNgqooJ2fY/v9s3DmjqWcIp6zk5Hgn5L tHAEn12lkosthcKHZICRDsUNJ4bQ9LyYkgn26TU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=woqhRfRXgN XLAtsNqY8+xHzZrlo=; b=pLsnhYMRSRVXxgX2cQh/MxkJq2xIJFe0BVMsS4JYcn eRRE7J3y+DdzbrxZJS74OgM93rxl84PpN+qCk9jC5KVOIT1fadMvkHhkuuayGBTU BDfF/8jKouZJeabUbgnjK/NL63ssTrdRii2io/pCyuvm3cOK7gk7sVBcxwFblYf/ E= Received: (qmail 31195 invoked by alias); 3 Apr 2014 01:06:55 -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 31177 invoked by uid 89); 3 Apr 2014 01:06:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 03 Apr 2014 01:06:52 +0000 Received: by mail-pa0-f42.google.com with SMTP id fb1so1017707pad.1 for ; Wed, 02 Apr 2014 18:06:50 -0700 (PDT) X-Received: by 10.66.66.135 with SMTP id f7mr3820546pat.22.1396487210318; Wed, 02 Apr 2014 18:06:50 -0700 (PDT) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id de5sm80154pbc.66.2014.04.02.18.06.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 18:06:49 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id BF230EA00E4; Thu, 3 Apr 2014 11:36:44 +1030 (CST) Date: Thu, 3 Apr 2014 11:36:44 +1030 From: Alan Modra To: Hans-Peter Nilsson Cc: gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: vdso handling Message-ID: <20140403010644.GB18201@bubble.grove.modra.org> Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org, binutils@sourceware.org References: <5321C8FA.40708@gmail.com> <5321CE1A.20509@redhat.com> <20140313235347.GD3384@bubble.grove.modra.org> <20140318230939.GA9145@bubble.grove.modra.org> <5329879C.6070805@redhat.com> <20140320013305.GA13347@bubble.grove.modra.org> <532C5F60.80700@redhat.com> <20140328061321.GU18201@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-DH-Original-To: gdb@patchwork.siddhesh.in On Wed, Apr 02, 2014 at 04:04:24AM -0400, Hans-Peter Nilsson wrote: > The new size parameter uses size_t in bfd headers, breaking some > simulators like cris-elf, frv-elf, h8300-elf, iq2000-elf, > m32r-elf, mips-elf, mn10300-elf. > > The obvious change is to instead use bfd_size_type, like > everything else in BFD headers. Any reason not to do that here? I originally had bfd_size_type and wondered if we could use size_t, which is the natural type to use here. (bfd_size_type might be 64-bit and it doesn't really make sense to use that when describing a memory area on a 32-bit host.) gdb and binutils built without trouble on a few targets, so I went with size_t. Sorry about the sim breakage. * elf-bfd.h (struct elf_backend_data ): Replace "size_t size" with "bfd_size_type size". (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (bfd_from_remote_memory): Likewise. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 6d07303..f58a3b7 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1191,7 +1191,7 @@ struct elf_backend_data /* This function implements `bfd_elf_bfd_from_remote_memory'; see elf.c, elfcode.h. */ bfd *(*elf_backend_bfd_from_remote_memory) - (bfd *templ, bfd_vma ehdr_vma, size_t size, bfd_vma *loadbasep, + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, bfd_size_type len)); @@ -2334,10 +2334,10 @@ extern char *elfcore_write_ppc_linux_prpsinfo32 (bfd *, char *, int *, const struct elf_internal_linux_prpsinfo *); extern bfd *_bfd_elf32_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, size_t size, bfd_vma *loadbasep, + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)); extern bfd *_bfd_elf64_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, size_t size, bfd_vma *loadbasep, + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)); extern bfd_vma bfd_elf_obj_attr_size (bfd *); diff --git a/bfd/elf.c b/bfd/elf.c index d67b917..9e46f7c 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -9908,7 +9908,7 @@ bfd * bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma ehdr_vma, - size_t size, + bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)) { diff --git a/bfd/elfcode.h b/bfd/elfcode.h index f840065..a49a708 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1605,7 +1605,7 @@ bfd * NAME(_bfd_elf,bfd_from_remote_memory) (bfd *templ, bfd_vma ehdr_vma, - size_t size, + bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)) {