From patchwork Sat May 12 13:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 912413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-92481-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="O0p6GbK0"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jnvg0J83z9s15 for ; Sat, 12 May 2018 23:32:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=NozSkFSvHVnCAACq jLKxCLrySWRkLRCoXz4zScNWbbjRY3nXLMYNSKePh/vz6r2JjWF7enegM1RnzkMa juSJ41VSLMXVdpIJeYomSiYIbOEq58Wo9+m2qyESrXDMHAFFoRKARvqYKLUXhhYJ rRYZ3P092jwwbrRFSYODqoe3VEo= 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:date:from:to:subject:message-id:reply-to :mime-version:content-type; s=default; bh=jj02vphO9o5jpKCgK6H86L qkuEM=; b=O0p6GbK0ZeINbZELX6rU+1kRu9m2s8paVzrCLZ8VG8jpEnm3mKg0F4 I3YUtORPWv9GWWc/ka0QxlNqB7OBEgQqlHeM53fQ1EEcc4u6rlksaC4KilUATMVb TNly0hkvOsRSqWdf5nIdKM3Uc1Mguf8NPSxn0nNv9+w3d8lYFpFo4= Received: (qmail 130544 invoked by alias); 12 May 2018 13:32:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk 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 130532 invoked by uid 89); 12 May 2018 13:32:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NO_DNS_FOR_FROM autolearn=ham version=3.3.2 spammy= X-HELO: mga12.intel.com X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 Date: Sat, 12 May 2018 06:32:37 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] x86: Add sysdeps/x86/ldsodefs.h Message-ID: <20180512133237.GA30516@gmail.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) Merge sysdeps/i386/ldsodefs.h and sysdeps/x86_64/ldsodefs.h into sysdeps/x86/ldsodefs.h. Tested on i686 and x86-64. Any comments? H.J. ---- * sysdeps/i386/ldsodefs.h: Removed. * sysdeps/x86_64/ldsodefs.h: Moved to ... * sysdeps/x86/ldsodefs.h: This. (La_i86_regs): New. (La_i86_retval): Likewise. (ARCH_PLTENTER_MEMBERS): Add i86_gnu_pltenter. (ARCH_PLTEXIT_MEMBERS): i86_gnu_pltexit. Acked-by: Christian Brauner (Ubuntu) christian@brauner.io --- sysdeps/i386/ldsodefs.h | 41 ------------------------------ sysdeps/{x86_64 => x86}/ldsodefs.h | 14 ++++++++-- 2 files changed, 12 insertions(+), 43 deletions(-) delete mode 100644 sysdeps/i386/ldsodefs.h rename sysdeps/{x86_64 => x86}/ldsodefs.h (79%) diff --git a/sysdeps/i386/ldsodefs.h b/sysdeps/i386/ldsodefs.h deleted file mode 100644 index 900ae48f6a..0000000000 --- a/sysdeps/i386/ldsodefs.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 1995-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _I386_LDSODEFS_H -#define _I386_LDSODEFS_H 1 - -#include -#include - -struct La_i86_regs; -struct La_i86_retval; - -#define ARCH_PLTENTER_MEMBERS \ - Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \ - uintptr_t *, struct La_i86_regs *, \ - unsigned int *, const char *name, \ - long int *framesizep) - -#define ARCH_PLTEXIT_MEMBERS \ - unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \ - uintptr_t *, const struct La_i86_regs *, \ - struct La_i86_retval *, const char *) - -#include_next - -#endif diff --git a/sysdeps/x86_64/ldsodefs.h b/sysdeps/x86/ldsodefs.h similarity index 79% rename from sysdeps/x86_64/ldsodefs.h rename to sysdeps/x86/ldsodefs.h index 026fdd28ad..0616215b7a 100644 --- a/sysdeps/x86_64/ldsodefs.h +++ b/sysdeps/x86/ldsodefs.h @@ -1,4 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. + X86 version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -16,18 +17,24 @@ License along with the GNU C Library; if not, see . */ -#ifndef _X86_64_LDSODEFS_H -#define _X86_64_LDSODEFS_H 1 +#ifndef _X86_LDSODEFS_H +#define _X86_LDSODEFS_H 1 #include #include +struct La_i86_regs; +struct La_i86_retval; struct La_x86_64_regs; struct La_x86_64_retval; struct La_x32_regs; struct La_x32_retval; #define ARCH_PLTENTER_MEMBERS \ + Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, struct La_i86_regs *, \ + unsigned int *, const char *name, \ + long int *framesizep); \ Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, \ uintptr_t *, \ uintptr_t *, struct La_x86_64_regs *, \ @@ -39,6 +46,9 @@ struct La_x32_retval; long int *framesizep) #define ARCH_PLTEXIT_MEMBERS \ + unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \ + uintptr_t *, const struct La_i86_regs *, \ + struct La_i86_retval *, const char *); \ unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, \ uintptr_t *, \ uintptr_t *, \