]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix Wundef warning for ELF_MACHINE_NO_RELA
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Thu, 26 Jun 2014 09:47:40 +0000 (15:17 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Thu, 26 Jun 2014 17:00:40 +0000 (22:30 +0530)
This patch defines ELF_MACHINE_NO_RELA on all architectures.  Tested
only on x86_64 to verify that the sources before and after are
identical except for two instructions that pass the current line
number in dl-machine.h to assert_fail.

17 files changed:
ChangeLog
elf/dl-runtime.c
sysdeps/aarch64/dl-machine.h
sysdeps/hppa/dl-machine.h
sysdeps/ia64/dl-machine.h
sysdeps/m68k/dl-machine.h
sysdeps/microblaze/dl-machine.h
sysdeps/mips/dl-machine.h
sysdeps/powerpc/powerpc32/dl-machine.h
sysdeps/powerpc/powerpc64/dl-machine.h
sysdeps/s390/s390-32/dl-machine.h
sysdeps/s390/s390-64/dl-machine.h
sysdeps/sh/dl-machine.h
sysdeps/sparc/sparc32/dl-machine.h
sysdeps/sparc/sparc64/dl-machine.h
sysdeps/tile/dl-machine.h
sysdeps/x86_64/dl-machine.h

index 39d46a62d3bb9e9454f4a6f770932e9cb9f63f3e..40b5f89972c3e1ee1c9fed0184ab933071e40476 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2014-06-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+       * elf/dl-runtime.c: Check for value of ELF_MACHINE_NO_RELA
+       instead of whether it is defined.
+       * sysdeps/aarch64/dl-machine.h: Define ELF_MACHINE_NO_RELA.
+       * sysdeps/hppa/dl-machine.h: Likewise.
+       * sysdeps/ia64/dl-machine.h: Likewise.
+       * sysdeps/m68k/dl-machine.h: Likewise.
+       * sysdeps/microblaze/dl-machine.h: Likewise.
+       * sysdeps/mips/dl-machine.: Likewise.
+       * sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
+       * sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
+       * sysdeps/s390/s390-32/dl-machine.h: Likewise.
+       * sysdeps/s390/s390-64/dl-machine.h: Likewise.
+       * sysdeps/sh/dl-machine.h: Likewise.
+       * sysdeps/sparc/sparc32/dl-machine.h: Likewise.
+       * sysdeps/sparc/sparc64/dl-machine.h: Likewise.
+       * sysdeps/tile/dl-machine.h: Likewise.
+       * sysdeps/x86_64/dl-machine.h: Likewise.
+
        * nscd/connections.c (enum usekey) [SEPARATE_KEY]: Remove
        code.
        (verify_persistent_db): Likewise.
index 773cb42610350e26c18e607764a34d7b7efe6d43..11eba4a83264c21061210b25081495bdf6d49001 100644 (file)
@@ -29,7 +29,7 @@
 #include <dl-irel.h>
 
 
-#if (!defined ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \
+#if (!ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \
     || ELF_MACHINE_NO_REL
 # define PLTREL  ElfW(Rela)
 #else
index 997c860ccb85355c6a9240daf3f7036b9547ef96..6615b8f8575eb46ebe6efb368074c74047154b1a 100644 (file)
@@ -198,6 +198,7 @@ _dl_start_user:                                                     \n\
 
 /* AArch64 uses RELA not REL */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 static inline ElfW(Addr)
 elf_machine_fixup_plt (struct link_map *map, lookup_t t,
index ba21f07d7f779e4afbc643fbe4afda68de7e3f2e..9c7471e938ae3c657e6dbd56550efb1951bbeb06 100644 (file)
@@ -488,6 +488,7 @@ asm (                                                                       \
 
 /* We only use RELA. */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Return the address of the entry point. */
 #define ELF_MACHINE_START_ADDRESS(map, start)                  \
index 853e6fd34930381ec2c974af8b256c828a206aad..7d3be0487f004e006e9e57d3bf8fdc57c24482b9 100644 (file)
@@ -320,6 +320,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 
 /* According to the IA-64 specific documentation, Rela is always used.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Return the address of the entry point. */
 #define ELF_MACHINE_START_ADDRESS(map, start)                  \
index 3ec9862f8cbfd581bd2e99e512d1b385479d6342..4e7c7db846ad6da3b44c08a213e408d7b70fe6ce 100644 (file)
@@ -178,6 +178,7 @@ _dl_start_user:\n\
 
 /* The m68k never uses Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 static inline Elf32_Addr
 elf_machine_fixup_plt (struct link_map *map, lookup_t t,
index 848e82210636b8f497991e507f207a729c62ce05..d230a1b4e3babf533aa62fe6ac173f46e8d441da 100644 (file)
@@ -170,6 +170,7 @@ _dl_start_user:\n\
 
 /* The microblaze never uses Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 static inline Elf32_Addr
 elf_machine_fixup_plt (struct link_map *map, lookup_t t,
index b5bf4ad6d3afee2c3864c15fb2a02dfde5b97d0e..eef0384e4e076bfec7101a145b498e4570850852 100644 (file)
@@ -60,6 +60,8 @@
    | (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY))
 
 #define ELF_MACHINE_PLT_REL 1
+#define ELF_MACHINE_NO_REL 0
+#define ELF_MACHINE_NO_RELA 0
 
 /* Translate a processor specific dynamic tag to the index
    in l_info array.  */
index 23b610fbf16e3457089a6267522aea95ba472e37..42fd3740d652b411efc50185c00e57e26991c3b8 100644 (file)
@@ -148,6 +148,7 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
 
 /* The PowerPC never uses REL relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Set up the loaded object described by MAP so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.
index bc99183570c05dd96dbfd395b481eef000c9c4f9..735a549f5414fa404d261b62f3a7a3eb97dc700f 100644 (file)
@@ -294,6 +294,7 @@ BODY_PREFIX "_dl_start_user:\n"                                             \
 
 /* The PowerPC never uses REL relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Stuff for the PLT.  */
 #if _CALL_ELF != 2
index 4fd2745801cba762aeea0d29e1ab6d0bb3662718..527233ba548863df9fc36871c5c3969c840557cc 100644 (file)
@@ -226,6 +226,7 @@ _dl_start_user:\n\
 
 /* The S390 never uses Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* We define an initialization functions.  This is called very early in
    _dl_sysdep_start.  */
index 2f3716987ca1bff3906ff103ba78f99294ce9e29..e48d355daac3fefb89f37c69703ba9473d87576a 100644 (file)
@@ -205,6 +205,7 @@ _dl_start_user:\n\
 
 /* The 64 bit S/390 never uses Elf64_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* We define an initialization functions.  This is called very early in
    _dl_sysdep_start.  */
index 4f3db89ed3dafa2642a4430304300f39d1d1c2ba..81a417d9aaa5c0598de2399e74dff069eaddc6cd 100644 (file)
@@ -251,6 +251,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
 
 /* SH never uses Elf32_Rel relocations.         */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 #ifdef RESOLVE_MAP
 
index e7d31b40b67ff3ca416be5805cc469bb11cc8eb7..4b79cd69fc3f2f53896aaded4b3dbce0b5bea875 100644 (file)
@@ -197,6 +197,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 
 /* The SPARC never uses Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Undo the sub %sp, 6*4, %sp; add %sp, 22*4, %o0 below to get at the
    value we want in __libc_stack_end.  */
index ef4ad4ce9e8367d918098483ce1c2ab91a0904a8..d6d263e96c89818ba21492c6e6d9afc26e3b5168 100644 (file)
@@ -119,6 +119,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
 
 /* The SPARC never uses Elf64_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Set up the loaded object described by L so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.  */
index d686a655ff176797f4c0df6232041ea676853179..8be6758675f9fe17292fdc408b2c5215c68ab8c2 100644 (file)
@@ -223,6 +223,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 
 /* TILE never uses Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* We define an initialization functions.  This is called very early in
    _dl_sysdep_start.  */
index 8df04a96ca2dc749953ade54da179272b09f95c8..f9ee1f79b65887f128f21238c24d4ff9bb6ee4b7 100644 (file)
@@ -189,6 +189,7 @@ _dl_start_user:\n\
 
 /* The x86-64 never uses Elf64_Rel/Elf32_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* We define an initialization function.  This is called very early in
    _dl_sysdep_start.  */