Explorar o código

use attribute_unused instead of hardcoded

Peter S. Mazinger %!s(int64=18) %!d(string=hai) anos
pai
achega
9f341620c1
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 1 1
      ldso/include/dl-string.h
  2. 4 2
      ldso/ldso/i386/dl-sysdep.h

+ 1 - 1
ldso/include/dl-string.h

@@ -8,7 +8,7 @@
 #ifndef _LINUX_STRING_H_
 #ifndef _LINUX_STRING_H_
 #define _LINUX_STRING_H_
 #define _LINUX_STRING_H_
 
 
-#include <dl-sysdep.h> // for do_rem
+#include <dl-sysdep.h> /* for do_rem */
 #include <features.h>
 #include <features.h>
 
 
 static size_t _dl_strlen(const char * str);
 static size_t _dl_strlen(const char * str);

+ 4 - 2
ldso/ldso/i386/dl-sysdep.h

@@ -44,7 +44,8 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_ent
 /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
 /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
    first element of the GOT.  This must be inlined in a function which
    first element of the GOT.  This must be inlined in a function which
    uses global data.  */
    uses global data.  */
-static inline Elf32_Addr __attribute__ ((unused))
+static inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
+static inline Elf32_Addr
 elf_machine_dynamic (void)
 elf_machine_dynamic (void)
 {
 {
 	register Elf32_Addr *got __asm__ ("%ebx");
 	register Elf32_Addr *got __asm__ ("%ebx");
@@ -53,7 +54,8 @@ elf_machine_dynamic (void)
 
 
 
 
 /* Return the run-time load address of the shared object.  */
 /* Return the run-time load address of the shared object.  */
-static inline Elf32_Addr __attribute__ ((unused))
+static inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
+static inline Elf32_Addr
 elf_machine_load_address (void)
 elf_machine_load_address (void)
 {
 {
 	/* It doesn't matter what variable this is, the reference never makes
 	/* It doesn't matter what variable this is, the reference never makes