From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31196 invoked by alias); 3 Apr 2014 01:06:55 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@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, 03 Apr 2014 01:06:00 -0000 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00031.txt.bz2 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)) { -- Alan Modra Australia Development Lab, IBM