From patchwork Thu Jul 28 18:20:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 653850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s0gCT1jJVz9t29 for ; Fri, 29 Jul 2016 04:20:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm-com.20150623.gappssmtp.com header.i=@embecosm-com.20150623.gappssmtp.com header.b=tXj/EGp1; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A17FF2EFAC; Thu, 28 Jul 2016 18:20:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T1DUrKRsyNCO; Thu, 28 Jul 2016 18:20:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D9FE83162D; Thu, 28 Jul 2016 18:20:42 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 00C411C0FFC for ; Thu, 28 Jul 2016 18:20:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F349E8BC45 for ; Thu, 28 Jul 2016 18:20:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zRMyhhpKB6z7 for ; Thu, 28 Jul 2016 18:20:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4D8B38BCDF for ; Thu, 28 Jul 2016 18:20:38 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id o80so120057564wme.1 for ; Thu, 28 Jul 2016 11:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=jA9kSEiQeGeTbYiBSirdgVkhyHlB6p8e5a4Cr80RA78=; b=tXj/EGp18ypEtveiZ9BGUW1zObB9bqi9ltG+6DL5kLv/gvfOJy5v2nx0JTmqlgI9Q/ bknj+AsvaPhg8QVjc92IENTvZioSoMCnByazMUvAQNaaain9GrI1mebKvPbuPuZjoOWA Hm+sz9Wm1YB7eK1OwptKe0tyOhQQSQMPVq0WvBjhQ1MwHvAdLu9ZMlPs4eOPRplE+HtY MhwDEu2/XyYUoE2ldyfwJLUbPa4uyajN9WcbWIn7WdU7uDSR03vkBvGykIRMvc0QnN37 FpkjimNLzZAxvkifHRo3YpOrE1j+MqnVV6jgt1wkIigO0NvnCHJviNDJ7ZRAQbg2XwMA tC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=jA9kSEiQeGeTbYiBSirdgVkhyHlB6p8e5a4Cr80RA78=; b=CAptpb5iXUovuyZwGRBOKBpu2ADwpabuKEgWCb5BMAplk+ej8YZfyEtw0GvdtmJQwv Vakctxdys1rcCQywmbjkPNcy8XSOqyveIbc6l0xNBlO+o8DiYN3X8zbKQ5J370zQqbCO MFe7l/ARZefYu8RknIE0g7YI1HrAT9gGw1qHIJdJy1ldhyqzj4uy4FztEgCjaO6WEN2/ S6tYYwXQ/FVpyTZLOL1EwSF0f5NF2fwlj7/QfSN4Lh1gSP8sycLRMezrl1GkpYdpaUcT zCkNSfBIfvVDA2c4HhqhKtd27SXJYfYB+YWvsWhhvX22BlvOYYlBpOZmYA3uJrwop25A ffqA== X-Gm-Message-State: AEkooutsPgdkDHrfBm0+PbSSqqzmxZtRV1gO7z+r7Lcq8griajudMVcLt6JawFXNq94Gvw== X-Received: by 10.28.29.211 with SMTP id d202mr38131728wmd.64.1469730036761; Thu, 28 Jul 2016 11:20:36 -0700 (PDT) Received: from localhost (host86-165-30-37.range86-165.btcentralplus.com. [86.165.30.37]) by smtp.gmail.com with ESMTPSA id 17sm13457328wmf.6.2016.07.28.11.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 11:20:36 -0700 (PDT) From: Andrew Burgess To: uclibc@uclibc.org, devel@uclibc-ng.org Subject: [PATCH 1/2] ARC: Update relocation syntax for old-thread model code Date: Thu, 28 Jul 2016 19:20:14 +0100 Message-Id: <1469730034-8068-2-git-send-email-andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: References: In-Reply-To: References: Cc: noamca@mellanox.com, Vineet.Gupta1@synopsys.com, Alexey.Brodkin@synopsys.com X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" This commit reverses a change introduced in commit 20554a78a9bba that split some of the ARC code into two based on whether uClibc was configured with native threads or not. The native thread code was updated to use the relocation syntax of modern binutils, while the non-native code path used a syntax only accepted in older versions of binutils. The problem with this is that the choice of old binutils or not is orthogonal to the choice of native threads or not, and so, inevitably a user with a recent version of binutils can make the choice to configure uClibc with non-native thread support, and run into code that will not assemble. The solution is either to abandon support for the old tools completely, or to add a new compile time flag for ARC that is set when the version of binutils being used is old; this new flag would allow the old relocation structure to be selected. In this commit I have simply dropped support for older versions of the tools. --- ldso/ldso/arc/dl-startup.h | 7 ------- ldso/ldso/arc/dl-sysdep.h | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ldso/ldso/arc/dl-startup.h b/ldso/ldso/arc/dl-startup.h index ef89b53..664b860 100644 --- a/ldso/ldso/arc/dl-startup.h +++ b/ldso/ldso/arc/dl-startup.h @@ -34,15 +34,8 @@ __asm__( " ; skip the extra args calc by dl_start() \n" " ld_s r1, [sp] ; orig argc from aux-vec Tbl \n" -#ifdef __UCLIBC_HAS_THREADS_NATIVE__ " ld r12, [pcl, _dl_skip_args@pcl] \n" - " add r2, pcl, _dl_fini@pcl ; finalizer \n" -#else - " add r12, pcl, _dl_skip_args-.+(.&2) \n" - " ld r12, [r12] \n" - " add r2, pcl, _dl_fini-.+(.&2) ; finalizer \n" -#endif " add2 sp, sp, r12 ; discard argv entries from stack\n" " sub_s r1, r1, r12 ; adjusted argc, on stack \n" diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h index caece99..aadf624 100644 --- a/ldso/ldso/arc/dl-sysdep.h +++ b/ldso/ldso/arc/dl-sysdep.h @@ -154,7 +154,7 @@ static __always_inline Elf32_Addr elf_machine_load_address(void) Elf32_Addr addr, tmp; __asm__ ( "ld %1, [pcl, _dl_start@gotpc] ;build addr of _dl_start \n" - "add %0, pcl, _dl_start-.+(.&2) ;runtime addr of _dl_start \n" + "add %0, pcl, _dl_start@pcl ;runtime addr of _dl_start \n" "sub %0, %0, %1 ;delta \n" : "=&r" (addr), "=r"(tmp) );