From 95b93c6e0d7bf0321f265cf6e85c7fb4417cbda6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 1 Nov 2017 05:37:10 -0700 Subject: [PATCH] x86: Add sysdeps/x86/sysdep.h Add a new header file, sysdeps/x86/sysdep.h, for common assembly code macros between i386 and x86-64. Tested on i686 and x86-64. There are no differences in outputs of "readelf -a" and "objdump -dw" on all glibc shared objects before and after the patch. * sysdeps/i386/sysdep.h: Include instead of . (ALIGNARG): Removed. (ASM_SIZE_DIRECTIVE): Likewise. (ENTRY): Likewise. (END): Likewise. (ENTRY_CHK): Likewise. (END_CHK): Likewise. (syscall_error): Likewise. (mcount): Likewise. (PSEUDO_END): Likewise. (L): Likewise. (atom_text_section): Likewise. * sysdeps/x86/sysdep.h: New file. * sysdeps/x86_64/sysdep.h: Include instead of . (ALIGNARG): Removed. (ASM_SIZE_DIRECTIVE): Likewise. (ENTRY): Likewise. (END): Likewise. (ENTRY_CHK): Likewise. (END_CHK): Likewise. (syscall_error): Likewise. (mcount): Likewise. (PSEUDO_END): Likewise. (L): Likewise. (atom_text_section): Likewise. --- ChangeLog | 30 ++++++++++++++++++ sysdeps/i386/sysdep.h | 45 +-------------------------- sysdeps/x86/sysdep.h | 69 +++++++++++++++++++++++++++++++++++++++++ sysdeps/x86_64/sysdep.h | 42 +------------------------ 4 files changed, 101 insertions(+), 85 deletions(-) create mode 100644 sysdeps/x86/sysdep.h diff --git a/ChangeLog b/ChangeLog index 6608b1b261..d38060b89f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2017-11-01 H.J. Lu + + * sysdeps/i386/sysdep.h: Include instead + of . + (ALIGNARG): Removed. + (ASM_SIZE_DIRECTIVE): Likewise. + (ENTRY): Likewise. + (END): Likewise. + (ENTRY_CHK): Likewise. + (END_CHK): Likewise. + (syscall_error): Likewise. + (mcount): Likewise. + (PSEUDO_END): Likewise. + (L): Likewise. + (atom_text_section): Likewise. + * sysdeps/x86/sysdep.h: New file. + * sysdeps/x86_64/sysdep.h: Include instead + of . + (ALIGNARG): Removed. + (ASM_SIZE_DIRECTIVE): Likewise. + (ENTRY): Likewise. + (END): Likewise. + (ENTRY_CHK): Likewise. + (END_CHK): Likewise. + (syscall_error): Likewise. + (mcount): Likewise. + (PSEUDO_END): Likewise. + (L): Likewise. + (atom_text_section): Likewise. + 2017-10-31 Rafal Luzynski * localedata/unicode-gen/gen_unicode_ctype.py (output_head): diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index d2b0860b99..5cd7f25e0d 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -16,7 +16,7 @@ License along with the GNU C Library; if not, see . */ -#include +#include #include /* For __GNUC_PREREQ. */ @@ -39,32 +39,6 @@ /* Syntactic details of assembler. */ -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1<. */ + +#ifndef _X86_SYSDEP_H +#define _X86_SYSDEP_H 1 + +#include + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1< +#include #ifdef __ASSEMBLER__ @@ -32,28 +32,6 @@ #define cfi_offset_rel_rsp(regn, off) .cfi_escape 0x10, regn, 0x4, 0x13, \ 0x77, off & 0x7F | 0x80, off >> 7 -/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ -#define ALIGNARG(log2) 1<