From patchwork Fri Nov 6 15:51:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 56136 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp1090622lbr; Fri, 6 Nov 2015 07:52:02 -0800 (PST) X-Received: by 10.66.141.73 with SMTP id rm9mr18432774pab.12.1446825122158; Fri, 06 Nov 2015 07:52:02 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ug9si882565pab.185.2015.11.06.07.52.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2015 07:52:02 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-return-89626-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of binutils-return-89626-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-89626-patch=linaro.org@sourceware.org; dkim=pass header.i=@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=ZGpkCrnS4ZQVb7qZ34Ea4lxrDGPxH jCUwlWjcMzTskz0wuPVA6GoQGTr11PebnZ+9CKZDGfDyZ48vIzZ685Q/z1BcwAy3 QfznHoH8mRmuy5MwctW24bPJL6gTgo+Br4jGLdEd6zuOfUgs0mOh4RLYR9vVX7Du R7DZjK7lC2ilkM= 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:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=xS7kEP5eCP/RVWYEtrrD+wQ21G0=; b=rNc dTjtG0U8IOWYrEACwFzZxAFXQPqQKUfp/PRnK5DPim7enHaFmnRHn4CEMmNTdQpJ mvkejkKUBe7xqtLRpbdAYWsKZ7dArGBXqx3K8hmOCxoYa82yaDGOaC9wsLu72Jco Nhf9dMRUC2HlFZnC1pB0+B+LqP24Vp5jJR+CPX8Q= Received: (qmail 93527 invoked by alias); 6 Nov 2015 15:51:48 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 93513 invoked by uid 89); 6 Nov 2015 15:51:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 Nov 2015 15:51:46 +0000 Received: by qgec40 with SMTP id c40so33843579qge.2 for ; Fri, 06 Nov 2015 07:51:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=sOmkMKYDX4NSTP4AC7EkIcOvBrvqx0KeC68uO9Jzto8=; b=hn0eSchKuJfbroxkbNZ14FbLJle2VrFExU2+6ItQ1iUi7w7Tw9ps2inDv0mA7GX3mr N/wqNOEF13fSdg82KY9AtaercJnXC+vJAQWe4RvFDHKTxTmvM+neJdW/mCVjbLtCTqao Cp2+i576luOoWg9wV7u8OeMrwYinZM1ObRHIbDOi9DRIO1szwYk/ezipF1EUHorH+teD Fe9daVJuH4OwVvGlpETEkgBCo0nc/z4dQqBg4bRaKkSG01kOFBFTaUTQct5qXOHsOWmF 5FIWDPEw97xBNBB6Y1vnAX1PbB2IsA/JNi9KY8FsLJkGuDrUx1kOjNXjeBRn/bNVdkKi 3g3w== X-Gm-Message-State: ALoCoQm0Eo2n9wpSi1pExC0F6FvLEksc/kVYgRhYiUG2mbdtT0NIG9Zp6Xtsdj0QaNlz4Jcjs6Nu MIME-Version: 1.0 X-Received: by 10.140.44.33 with SMTP id f30mr13823805qga.30.1446825104650; Fri, 06 Nov 2015 07:51:44 -0800 (PST) Received: by 10.140.29.136 with HTTP; Fri, 6 Nov 2015 07:51:44 -0800 (PST) Date: Fri, 6 Nov 2015 16:51:44 +0100 Message-ID: Subject: [LD, ARM] Fix in STM32L4XX patch From: Christophe Lyon To: binutils@sourceware.org X-IsSubscribed: yes Hi, While running the linker tests on a 32-bits i686 host with enable-64-bit-bfd=yes, I noticed that a test of the STM32L4XX patch was failing. This is because it expects a message containing an out-of-range offset, and does not print the right value: the print format contains %d while the value is of type long long. The attached small patch fixes that by forcing %ld and casting the value to (long), as it seems to be standard practice elsewhere in the binutils, although not very clean. Nick, don't you see this error? OK? Christophe. 2015-11-06 Christophe Lyon bfd/ * elf32-arm.c (elf32_arm_write_section): Force offset output as long (%ld). diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index fd4f743..4764523 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -17010,10 +17010,10 @@ elf32_arm_write_section (bfd *output_bfd, (*_bfd_error_handler) (_("%B(%#x): error: Cannot create STM32L4XX veneer. " - "Jump out of range by %d bytes. " + "Jump out of range by %ld bytes. " "Cannot encode branch instruction. "), output_bfd, - stm32l4xx_errnode->vma - 4, + (long)stm32l4xx_errnode->vma - 4, out_of_range); continue; }