From patchwork Mon Oct 27 07:59:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 39579 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BB79A2118A for ; Mon, 27 Oct 2014 08:03:03 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf139741lbv.5 for ; Mon, 27 Oct 2014 01:03:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=s0Q6j0ThN2lhcc3aKQdBap4yEZbs2IW+LQOP+u/bmvk=; b=gvdKuEvamk+X/HxvVR4X8/mAbjJfmuHgzAYizXAzJc3432bvzyqUSlivBIq07lrLIq 8fCy+SxXj3iMfikJMBr/6Lwl3vh7ARFHgJpzITI1gOhJXUO2v441KXEKN+XPuwBqlEws AHYj4asotGCjPKXmWUTtfRX/WsgyXmcG2qZ7YmOYb5NlwEChK/70lpVy6dTZwPyrJ/Sb n2Vb5vMTSdvrPHS2wzvRtNV61SMCXN5b2staC8vcwuUqTcyLj/vlFV2UyNF0Bk+D/Y1t 2rEx2/d2BUutjzNaPBIBLA7U/CHmATADUG2BlOV+zhTgZvD5bUibGLd4RmiZbNNzEw6X o/bA== X-Gm-Message-State: ALoCoQkQ4RZGbHvMrYYIkZDob7C/q9+yviXWkTGXv6vJzIF3wVLYAJcBub5pjhsQxKqCjPF6oEnh X-Received: by 10.180.182.164 with SMTP id ef4mr3594212wic.0.1414396982596; Mon, 27 Oct 2014 01:03:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.134 with SMTP id s6ls310191las.27.gmail; Mon, 27 Oct 2014 01:03:02 -0700 (PDT) X-Received: by 10.153.7.107 with SMTP id db11mr21791188lad.35.1414396982264; Mon, 27 Oct 2014 01:03:02 -0700 (PDT) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com. [2a00:1450:4010:c04::22e]) by mx.google.com with ESMTPS id p6si18642114lap.91.2014.10.27.01.03.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 01:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) client-ip=2a00:1450:4010:c04::22e; Received: by mail-lb0-f174.google.com with SMTP id p9so5317513lbv.33 for ; Mon, 27 Oct 2014 01:03:01 -0700 (PDT) X-Received: by 10.152.116.102 with SMTP id jv6mr21773696lab.40.1414396981933; Mon, 27 Oct 2014 01:03:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp247522lbz; Mon, 27 Oct 2014 01:03:01 -0700 (PDT) X-Received: by 10.70.48.202 with SMTP id o10mr22674483pdn.63.1414396980161; Mon, 27 Oct 2014 01:03:00 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id cq3si9809337pbb.193.2014.10.27.01.02.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 01:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-53811-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 16045 invoked by alias); 27 Oct 2014 08:00:19 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 15406 invoked by uid 89); 27 Oct 2014 08:00:02 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ig0-f182.google.com X-Received: by 10.42.37.138 with SMTP id y10mr17474072icd.26.1414396798623; Mon, 27 Oct 2014 00:59:58 -0700 (PDT) From: Andrew Pinski To: libc-alpha@sourceware.org Cc: Andrew Pinski Subject: [PATCH 08/29] [AARCH64] Add header guards to sysdep.h headers. Date: Mon, 27 Oct 2014 00:59:32 -0700 Message-Id: <1414396793-9005-9-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-1-git-send-email-apinski@cavium.com> References: <1414396793-9005-1-git-send-email-apinski@cavium.com> X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 * sysdeps/aarch64/sysdep.h: Add header guards. [AARCH64] Remove 64 from some relocation names as they have been renamed in later versions of the spec. The AARCH64 elf ABI spec renamed some relocations removing 64 from the TLS relocation names to make them constaint with the ILP32 named ones. * elf/elf.h (R_AARCH64_TLS_DTPMOD64): Rename to .. (R_AARCH64_TLS_DTPMOD): This. (R_AARCH64_TLS_DTPREL64): Rename to ... (R_AARCH64_TLS_DTPREL): This. (R_AARCH64_TLS_TPREL64): Rename to ... (R_AARCH64_TLS_TPREL): This. * sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Update R_AARCH64_TLS_DTPMOD64, R_AARCH64_TLS_DTPREL64, and R_AARCH64_TLS_TPREL64. (elf_machine_rela): Likewise. [AARCH64] Fix pltenter and pltexit for ILP32. * sysdeps/aarch64/bits/link.h (la_aarch64_gnu_pltenter): Use ElfW macro instead of hardcoded Elf64 types. --- elf/elf.h | 6 +++--- sysdeps/aarch64/bits/link.h | 6 +++--- sysdeps/aarch64/dl-machine.h | 12 ++++++------ sysdeps/aarch64/sysdep.h | 5 +++++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 78815e8..0dbf52b 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -2479,9 +2479,9 @@ typedef Elf32_Addr Elf32_Conflict; #define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */ #define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */ #define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */ -#define R_AARCH64_TLS_DTPMOD64 1028 /* Module number, 64 bit. */ -#define R_AARCH64_TLS_DTPREL64 1029 /* Module-relative offset, 64 bit. */ -#define R_AARCH64_TLS_TPREL64 1030 /* TP-relative offset, 64 bit. */ +#define R_AARCH64_TLS_DTPMOD 1028 /* Module number, 64 bit. */ +#define R_AARCH64_TLS_DTPREL 1029 /* Module-relative offset, 64 bit. */ +#define R_AARCH64_TLS_TPREL 1030 /* TP-relative offset, 64 bit. */ #define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */ #define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */ diff --git a/sysdeps/aarch64/bits/link.h b/sysdeps/aarch64/bits/link.h index fe06827..3a84a18 100644 --- a/sysdeps/aarch64/bits/link.h +++ b/sysdeps/aarch64/bits/link.h @@ -40,8 +40,8 @@ typedef struct La_aarch64_retval } La_aarch64_retval; __BEGIN_DECLS -extern Elf64_Addr -la_aarch64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, +extern ElfW(Addr) +la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, La_aarch64_regs *__regs, @@ -50,7 +50,7 @@ la_aarch64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, long int *__framesizep); extern unsigned int -la_aarch64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, +la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, const La_aarch64_regs *__inregs, diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h index 6615b8f..ebac353 100644 --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -188,9 +188,9 @@ _dl_start_user: \n\ #define elf_machine_type_class(type) \ ((((type) == R_AARCH64_JUMP_SLOT || \ - (type) == R_AARCH64_TLS_DTPMOD64 || \ - (type) == R_AARCH64_TLS_DTPREL64 || \ - (type) == R_AARCH64_TLS_TPREL64 || \ + (type) == R_AARCH64_TLS_DTPMOD || \ + (type) == R_AARCH64_TLS_DTPREL || \ + (type) == R_AARCH64_TLS_TPREL || \ (type) == R_AARCH64_TLSDESC) * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_AARCH64_COPY) * ELF_RTYPE_CLASS_COPY)) @@ -314,7 +314,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, break; } - case R_AARCH64_TLS_DTPMOD64: + case R_AARCH64_TLS_DTPMOD: #ifdef RTLD_BOOTSTRAP *reloc_addr = 1; #else @@ -325,12 +325,12 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, #endif break; - case R_AARCH64_TLS_DTPREL64: + case R_AARCH64_TLS_DTPREL: if (sym) *reloc_addr = sym->st_value + reloc->r_addend; break; - case R_AARCH64_TLS_TPREL64: + case R_AARCH64_TLS_TPREL: if (sym) { CHECK_STATIC_TLS (map, sym_map); diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h index 7169ba7..af196f2 100644 --- a/sysdeps/aarch64/sysdep.h +++ b/sysdeps/aarch64/sysdep.h @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see . */ +#ifndef _AARCH64_SYSDEP_H +#define _AARCH64_SYSDEP_H + #include #ifdef __ASSEMBLER__ @@ -96,3 +99,5 @@ #define mcount _mcount #endif /* __ASSEMBLER__ */ + +#endif /* _AARCH64_SYSDEP_H */