OSDN Git Service

libc/x86_64: use ELF-compatible definitions for assembler
authorRoman I Khimov <khimov@altell.ru>
Tue, 27 Apr 2010 11:19:15 +0000 (15:19 +0400)
committerAustin Foxley <austinf@cetoncorp.com>
Tue, 27 Apr 2010 15:41:50 +0000 (08:41 -0700)
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>
libc/sysdeps/linux/x86_64/sysdep.h

index 09bb926..4440d2b 100644 (file)
@@ -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.  */
 #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__ */