Synchronize sysdep.h with current glibc

So that I can more easily import sparc headers from it.

NO_UNDERSCORES is gone and is now always the default.
Some previously arch-specific defines are now valid for all platforms.

Change-Id: If9876b241719559bdcb5cd9d8b1dc97e5e3d96b3
Reviewed-on: https://review.haiku-os.org/c/1141
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
PulkoMandy
2019-03-03 21:01:12 +00:00
committed by waddlesplash
parent a7c23bb4a9
commit 8bdd63fe5d
10 changed files with 31 additions and 87 deletions
@@ -14,17 +14,12 @@
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE set by --with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
@@ -14,17 +14,12 @@
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE set by --with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
@@ -31,10 +31,6 @@
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
/* In ELF C symbols are asm symbols. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
#else
#define ALIGNARG(log2) log2
@@ -72,13 +68,11 @@
#define CALL_MCOUNT /* Do nothing. */
#endif
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
#define syscall_error __syscall_error
#define mcount _mcount
#endif
#define PSEUDO(name, syscall_name, args) \
.globl syscall_error; \
@@ -14,17 +14,12 @@
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE set by --with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
@@ -14,17 +14,12 @@
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE set by --with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
@@ -31,10 +31,6 @@
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* In ELF C symbols are asm symbols. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
#else
#define ALIGNARG(log2) log2
@@ -88,13 +84,11 @@
#define CALL_MCOUNT /* Do nothing. */
#endif
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
#define syscall_error __syscall_error
#define mcount _mcount
#endif
#define PSEUDO(name, syscall_name, args) \
lose: SYSCALL_PIC_SETUP \
@@ -14,17 +14,12 @@
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE set by --with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
@@ -21,25 +21,6 @@
#ifdef __ASSEMBLER__
/* Syntactic details of assembler. */
#define cfi_startproc .cfi_startproc
#define cfi_endproc .cfi_endproc
#define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
#define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
#define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
#define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
#define cfi_offset(reg, off) .cfi_offset reg, off
#define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
#define cfi_register(r1, r2) .cfi_register r1, r2
#define cfi_return_column(reg) .cfi_return_column reg
#define cfi_restore(reg) .cfi_restore reg
#define cfi_same_value(reg) .cfi_same_value reg
#define cfi_undefined(reg) .cfi_undefined reg
#define cfi_remember_state .cfi_remember_state
#define cfi_restore_state .cfi_restore_state
#define cfi_window_save .cfi_window_save
#ifdef HAVE_ELF
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
@@ -48,10 +29,6 @@
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* In ELF C symbols are asm symbols. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
#else
#define ALIGNARG(log2) log2
@@ -91,13 +68,11 @@
#define CALL_MCOUNT /* Do nothing. */
#endif
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
#define syscall_error __syscall_error
#define mcount _mcount
#endif
#define PSEUDO(name, syscall_name, args) \
lose: \
@@ -63,19 +63,11 @@
#endif
#ifndef __SYMBOL_PREFIX
# ifdef NO_UNDERSCORES
# define __SYMBOL_PREFIX
# else
# define __SYMBOL_PREFIX "_"
# endif
#endif
#ifndef C_SYMBOL_NAME
# ifdef NO_UNDERSCORES
# define C_SYMBOL_NAME(name) name
# else
# define C_SYMBOL_NAME(name) _##name
# endif
#endif
#ifndef ASM_LINE_SEP
+26 -12
View File
@@ -1,5 +1,5 @@
/* Generic asm macros used on many machines.
Copyright (C) 1991, 92, 93, 96, 98 Free Software Foundation, Inc.
Copyright (C) 1991-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
@@ -13,28 +13,19 @@
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, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include "libc-symbols.h"
#ifndef C_LABEL
/* Define a macro we can use to construct the asm name for a C symbol. */
#ifdef NO_UNDERSCORES
#ifdef __STDC__
#define C_LABEL(name) name##:
#else
#define C_LABEL(name) name/**/:
#endif
#else
#ifdef __STDC__
#define C_LABEL(name) _##name##:
#else
#define C_LABEL(name) _/**/name/**/:
#endif
#endif
#endif
@@ -43,3 +34,26 @@
#ifndef END
#define END(sym)
#endif
/* Makros to generate eh_frame unwind information. */
#ifdef __ASSEMBLER__
# define cfi_startproc .cfi_startproc
# define cfi_endproc .cfi_endproc
# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
# define cfi_offset(reg, off) .cfi_offset reg, off
# define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
# define cfi_register(r1, r2) .cfi_register r1, r2
# define cfi_return_column(reg) .cfi_return_column reg
# define cfi_restore(reg) .cfi_restore reg
# define cfi_same_value(reg) .cfi_same_value reg
# define cfi_undefined(reg) .cfi_undefined reg
# define cfi_remember_state .cfi_remember_state
# define cfi_restore_state .cfi_restore_state
# define cfi_window_save .cfi_window_save
# define cfi_personality(enc, exp) .cfi_personality enc, exp
# define cfi_lsda(enc, exp) .cfi_lsda enc, exp
#endif