Browse Source

libc/x86_64: use ELF-compatible definitions for assembler

Fixes open/read/write/close breakage with NPTL on x86_64 (due to missing
'.type' declaration).

Done this way because there are already ELF-style definitions in assemebler
code for x86_64 and looks like HAVE_ELF is not defined and used this days.
Or the other way around, it'd be a bit strange for x86_64 not to have ELF.

Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov 15 years ago
parent
commit
6b5c120960
1 changed files with 1 additions and 17 deletions
  1. 1 17
      libc/sysdeps/linux/x86_64/sysdep.h

+ 1 - 17
libc/sysdeps/linux/x86_64/sysdep.h

@@ -27,8 +27,6 @@
 
 /* Syntactic details of assembler.  */
 
-#ifdef HAVE_ELF
-
 /* ELF uses byte-counts for .align, most others use log2 of count of bytes.  */
 #define ALIGNARG(log2) 1<<log2
 /* For ELF we need the `.type' directive to make shared libs work right.  */
@@ -39,15 +37,6 @@
 #undef	NO_UNDERSCORES
 #define NO_UNDERSCORES
 
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type)	/* Nothing is specified.  */
-#define ASM_SIZE_DIRECTIVE(name)	/* Nothing is specified.  */
-
-#endif
-
-
 /* Define an entry point visible from C.  */
 #define	ENTRY(name)							      \
   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
@@ -107,12 +96,7 @@ lose:									      \
 
 /* Local label name for asm code. */
 #ifndef L
-# ifdef HAVE_ELF
-/* ELF-like local names start with `.L'.  */
-#  define L(name)	.L##name
-# else
-#  define L(name)	name
-# endif
+#define L(name)	.L##name
 #endif
 
 #endif	/* __ASSEMBLER__ */