|
|
00db10 |
commit 4cf5b6d0d7c8dd40526375f384133262ed7b2ccc
|
|
|
00db10 |
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
|
|
|
00db10 |
Date: Thu Jun 26 15:17:40 2014 +0530
|
|
|
00db10 |
|
|
|
00db10 |
Fix Wundef warning for ELF_MACHINE_NO_RELA
|
|
|
00db10 |
|
|
|
00db10 |
This patch defines ELF_MACHINE_NO_RELA on all architectures. Tested
|
|
|
00db10 |
only on x86_64 to verify that the sources before and after are
|
|
|
00db10 |
identical except for two instructions that pass the current line
|
|
|
00db10 |
number in dl-machine.h to assert_fail.
|
|
|
00db10 |
|
|
|
00db10 |
Conflicts:
|
|
|
00db10 |
sysdeps/microblaze/dl-machine.h
|
|
|
00db10 |
|
|
|
00db10 |
File removed manally due to missing microblaze port in our tree.
|
|
|
00db10 |
|
|
|
00db10 |
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
|
|
|
00db10 |
index 1ad2e4da7a654633..a42e3c4924e067ba 100644
|
|
|
00db10 |
--- a/elf/dl-runtime.c
|
|
|
00db10 |
+++ b/elf/dl-runtime.c
|
|
|
00db10 |
@@ -29,7 +29,7 @@
|
|
|
00db10 |
#include <dl-irel.h>
|
|
|
00db10 |
|
|
|
00db10 |
|
|
|
00db10 |
-#if (!defined ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \
|
|
|
00db10 |
+#if (!ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \
|
|
|
00db10 |
|| ELF_MACHINE_NO_REL
|
|
|
00db10 |
# define PLTREL ElfW(Rela)
|
|
|
00db10 |
#else
|
|
|
00db10 |
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
|
|
|
00db10 |
index 40b0587ba42cd59e..4faf818b710d6ed7 100644
|
|
|
00db10 |
--- a/sysdeps/aarch64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/aarch64/dl-machine.h
|
|
|
00db10 |
@@ -198,6 +198,7 @@ _dl_start_user: \n\
|
|
|
00db10 |
|
|
|
00db10 |
/* AArch64 uses RELA not REL */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
static inline ElfW(Addr)
|
|
|
00db10 |
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
|
|
|
00db10 |
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
|
|
|
00db10 |
index 1bee330f8b98b03f..3b6d7b8e776f1f57 100644
|
|
|
00db10 |
--- a/sysdeps/hppa/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/hppa/dl-machine.h
|
|
|
00db10 |
@@ -488,6 +488,7 @@ asm ( \
|
|
|
00db10 |
|
|
|
00db10 |
/* We only use RELA. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Return the address of the entry point. */
|
|
|
00db10 |
#define ELF_MACHINE_START_ADDRESS(map, start) \
|
|
|
00db10 |
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
|
|
|
00db10 |
index 1ec69d759179b555..4e8dcb804ae9b7a3 100644
|
|
|
00db10 |
--- a/sysdeps/ia64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/ia64/dl-machine.h
|
|
|
00db10 |
@@ -320,6 +320,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
|
|
00db10 |
|
|
|
00db10 |
/* According to the IA-64 specific documentation, Rela is always used. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Return the address of the entry point. */
|
|
|
00db10 |
#define ELF_MACHINE_START_ADDRESS(map, start) \
|
|
|
00db10 |
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
|
|
|
00db10 |
index b2914192d839021f..f40c9b580c49e0c7 100644
|
|
|
00db10 |
--- a/sysdeps/m68k/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/m68k/dl-machine.h
|
|
|
00db10 |
@@ -178,6 +178,7 @@ _dl_start_user:\n\
|
|
|
00db10 |
|
|
|
00db10 |
/* The m68k never uses Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
static inline Elf32_Addr
|
|
|
00db10 |
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
|
|
|
00db10 |
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
|
|
|
00db10 |
index 9b970a26ed8bb42d..9d7b0f516c64207d 100644
|
|
|
00db10 |
--- a/sysdeps/mips/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/mips/dl-machine.h
|
|
|
00db10 |
@@ -60,6 +60,8 @@
|
|
|
00db10 |
| (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY))
|
|
|
00db10 |
|
|
|
00db10 |
#define ELF_MACHINE_PLT_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_REL 0
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Translate a processor specific dynamic tag to the index
|
|
|
00db10 |
in l_info array. */
|
|
|
00db10 |
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
|
00db10 |
index 3ae27a4924e95063..490de3281ff30ee8 100644
|
|
|
00db10 |
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
|
|
|
00db10 |
@@ -148,6 +148,7 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
|
|
|
00db10 |
|
|
|
00db10 |
/* The PowerPC never uses REL relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Set up the loaded object described by MAP so its unrelocated PLT
|
|
|
00db10 |
entries will jump to the on-demand fixup code in dl-runtime.c.
|
|
|
00db10 |
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
|
00db10 |
index d1d34835a02a1909..7937c0e1e4f846e0 100644
|
|
|
00db10 |
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
|
|
|
00db10 |
@@ -294,6 +294,7 @@ BODY_PREFIX "_dl_start_user:\n" \
|
|
|
00db10 |
|
|
|
00db10 |
/* The PowerPC never uses REL relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Stuff for the PLT. */
|
|
|
00db10 |
#if _CALL_ELF != 2
|
|
|
00db10 |
diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
|
|
|
00db10 |
index d2f57e6bbe13ec9d..002ede7e935727cc 100644
|
|
|
00db10 |
--- a/sysdeps/s390/s390-32/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/s390/s390-32/dl-machine.h
|
|
|
00db10 |
@@ -281,6 +281,7 @@ _dl_start_user:\n\
|
|
|
00db10 |
|
|
|
00db10 |
/* The S390 never uses Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* We define an initialization functions. This is called very early in
|
|
|
00db10 |
_dl_sysdep_start. */
|
|
|
00db10 |
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h
|
|
|
00db10 |
index c15f7e4d979b170c..d08ec8f783729db5 100644
|
|
|
00db10 |
--- a/sysdeps/s390/s390-64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/s390/s390-64/dl-machine.h
|
|
|
00db10 |
@@ -226,6 +226,7 @@ _dl_start_user:\n\
|
|
|
00db10 |
|
|
|
00db10 |
/* The 64 bit S/390 never uses Elf64_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* We define an initialization functions. This is called very early in
|
|
|
00db10 |
_dl_sysdep_start. */
|
|
|
00db10 |
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
|
|
|
00db10 |
index 1bb5d156c2640e75..5cb888c12124a5d2 100644
|
|
|
00db10 |
--- a/sysdeps/sh/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/sh/dl-machine.h
|
|
|
00db10 |
@@ -251,6 +251,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
|
|
|
00db10 |
|
|
|
00db10 |
/* SH never uses Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
#ifdef RESOLVE_MAP
|
|
|
00db10 |
|
|
|
00db10 |
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
|
|
|
00db10 |
index 04ce7854a1b4f64c..b33280ded7eb4a1c 100644
|
|
|
00db10 |
--- a/sysdeps/sparc/sparc32/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/sparc/sparc32/dl-machine.h
|
|
|
00db10 |
@@ -198,6 +198,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
|
|
00db10 |
|
|
|
00db10 |
/* The SPARC never uses Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Undo the sub %sp, 6*4, %sp; add %sp, 22*4, %o0 below to get at the
|
|
|
00db10 |
value we want in __libc_stack_end. */
|
|
|
00db10 |
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
|
|
|
00db10 |
index dec2fa0808a16da5..de3ecdca0321db07 100644
|
|
|
00db10 |
--- a/sysdeps/sparc/sparc64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/sparc/sparc64/dl-machine.h
|
|
|
00db10 |
@@ -119,6 +119,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
|
|
|
00db10 |
|
|
|
00db10 |
/* The SPARC never uses Elf64_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* Set up the loaded object described by L so its unrelocated PLT
|
|
|
00db10 |
entries will jump to the on-demand fixup code in dl-runtime.c. */
|
|
|
00db10 |
diff --git a/sysdeps/tile/dl-machine.h b/sysdeps/tile/dl-machine.h
|
|
|
00db10 |
index 09a29935827e84c5..6a62d8007d464290 100644
|
|
|
00db10 |
--- a/sysdeps/tile/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/tile/dl-machine.h
|
|
|
00db10 |
@@ -223,6 +223,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
|
|
00db10 |
|
|
|
00db10 |
/* TILE never uses Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* We define an initialization functions. This is called very early in
|
|
|
00db10 |
_dl_sysdep_start. */
|
|
|
00db10 |
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
|
|
|
00db10 |
index da89f2a6174a0d94..04edd797aa567bbe 100644
|
|
|
00db10 |
--- a/sysdeps/x86_64/dl-machine.h
|
|
|
00db10 |
+++ b/sysdeps/x86_64/dl-machine.h
|
|
|
00db10 |
@@ -209,6 +209,7 @@ _dl_start_user:\n\
|
|
|
00db10 |
|
|
|
00db10 |
/* The x86-64 never uses Elf64_Rel/Elf32_Rel relocations. */
|
|
|
00db10 |
#define ELF_MACHINE_NO_REL 1
|
|
|
00db10 |
+#define ELF_MACHINE_NO_RELA 0
|
|
|
00db10 |
|
|
|
00db10 |
/* We define an initialization function. This is called very early in
|
|
|
00db10 |
_dl_sysdep_start. */
|