From patchwork Mon Jan 28 13:12:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 14299 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 843AB23E92 for ; Mon, 28 Jan 2013 13:13:07 +0000 (UTC) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fiordland.canonical.com (Postfix) with ESMTP id 1B7B2A197F9 for ; Mon, 28 Jan 2013 13:13:07 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id b13so1802886vby.19 for ; Mon, 28 Jan 2013 05:13:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=Xbo0VKcoSft3PO+SVp6RAowXLfu/rRWIsJNzrrJCWMI=; b=lMRK+lW/ZqFJCxAMezglNquFwF6vWqZhJ8jnFlByEUG/vDrrSCjsN10ecDKaIVNIPE bcerXd6JfAF7BaUgAdaGddjbNIIOV3I4AaOPooefqpkyc5PX5exrN+IrUbcN3Mw9kwNW zlwtdMfcP33l/GMoQNSePnWCK8Sl+BkQgZTWXGZ4sWCbJc+bzfwNfkjEAuv+pJPXOvtk WDS3ne5VMhag3v3s6l8x3ReWs7pTNBbm3qcJU5Mx0oQmaiIVDpqGRHPtLckYDCV/trTX QUIPbhCcOqHbeKDCI0eBKJvauDAL8oDbR4i81biU7PvIhEyaVMmEZob1mEdBwh0Wci+H KzOA== X-Received: by 10.221.0.79 with SMTP id nl15mr14803926vcb.41.1359378786590; Mon, 28 Jan 2013 05:13:06 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp84301veb; Mon, 28 Jan 2013 05:13:06 -0800 (PST) X-Received: by 10.14.194.199 with SMTP id m47mr51803745een.11.1359378785511; Mon, 28 Jan 2013 05:13:05 -0800 (PST) Received: from afflict.kos.to (afflict.kos.to. [92.243.29.197]) by mx.google.com with ESMTPS id g49si16467278eep.44.2013.01.28.05.13.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 05:13:05 -0800 (PST) Received-SPF: neutral (google.com: 92.243.29.197 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) client-ip=92.243.29.197; Authentication-Results: mx.google.com; spf=neutral (google.com: 92.243.29.197 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) smtp.mail=riku.voipio@linaro.org Received: from aimless.elisa-laajakaista.fi (a91-156-58-157.elisa-laajakaista.fi [91.156.58.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id EDA6A264BB; Mon, 28 Jan 2013 14:13:02 +0100 (CET) From: Riku Voipio To: libbsd@lists.freedesktop.org Cc: Riku Voipio Subject: [PATCH] Add Aarch64 support Date: Mon, 28 Jan 2013 15:12:59 +0200 Message-Id: <1359378779-1884-1-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQl5gQ3CQz6K3yxp2ckEnz75UCwa/jjBaZl3ifcxZc6SYR0hNcK5JNmLUB1Lh+OY+z8bu5+O ELF_TARG_MACH picked up from kernel headers. Current Aarch64 implementations are LE, but BE implementations are possible as well. With this patch libbsd builds on Aarch64 and passes testsuite on LE simulator. Signed-off-by: Riku Voipio --- src/local-elf.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/local-elf.h b/src/local-elf.h index afcc8ed..306147e 100644 --- a/src/local-elf.h +++ b/src/local-elf.h @@ -37,7 +37,17 @@ #define ELF_TARG_VER EV_CURRENT -#if defined(__alpha__) +#if defined(__aarch64__) + +#define ELF_TARG_MACH EM_AARCH64 +#define ELF_TARG_CLASS ELFCLASS64 +#if defined(__AARCH64EB__) +#define ELF_TARG_DATA ELFDATA2MSB +#else +#define ELF_TARG_DATA ELFDATA2LSB +#endif + +#elif defined(__alpha__) #define ELF_TARG_MACH EM_ALPHA #define ELF_TARG_CLASS ELFCLASS64