(elf_machine_lookup_noplt_p, elf_machine_lookup_noexec_p): Remove.
authorUlrich Drepper <drepper@redhat.com>
Sun, 26 Aug 2001 22:26:38 +0000 (22:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 26 Aug 2001 22:26:38 +0000 (22:26 +0000)
(elf_machine_type_class): Define.

sysdeps/alpha/dl-machine.h
sysdeps/arm/dl-machine.h
sysdeps/cris/dl-machine.h
sysdeps/hppa/dl-machine.h
sysdeps/m68k/dl-machine.h
sysdeps/mips/dl-machine.h
sysdeps/mips/mips64/dl-machine.h

index 37e8136..64cca5c 100644 (file)
@@ -351,13 +351,13 @@ $fixup_stack:
 #define RTLD_START_SPECIAL_INIT /* nothing */
 #endif
 
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_lookup_noplt_p(type)  ((type) == R_ALPHA_JMP_SLOT)
-
-/* Nonzero iff TYPE should not be allowed to resolve to one of
-   the main executable's symbols, as for a COPY reloc, which we don't use.  */
-#define elf_machine_lookup_noexec_p(type)  (0)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc, which we don't
+   use.  */
+#define elf_machine_type_class(type)   \
+  (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
 #define ELF_MACHINE_JMP_SLOT    R_ALPHA_JMP_SLOT
index 7dfed99..2a4ce9f 100644 (file)
@@ -323,13 +323,13 @@ _dl_start_user:
 .previous\n\
 ");
 
-/* Nonzero iff TYPE should not be allowed to resolve to one of
-   the main executable's symbols, as for a COPY reloc.  */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#define elf_machine_type_class(type) \
+  ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+   | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
 #define ELF_MACHINE_JMP_SLOT   R_ARM_JUMP_SLOT
index ce8dfc6..e4778e3 100644 (file)
@@ -228,13 +228,13 @@ _dl_start_user:
        .size _dl_start_user, . - _dl_start_user
        .previous");
 
-/* Nonzero iff TYPE describes a relocation that should
-   skip the executable when looking up the symbol value.  */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#define elf_machine_type_class(type) \
+  ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT)        \
+   | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
 #define ELF_MACHINE_JMP_SLOT   R_CRIS_JUMP_SLOT
index 15e1c85..d13f15b 100644 (file)
@@ -454,14 +454,14 @@ asm (                                                                     \
 #endif
 
 
-/* Nonzero iff TYPE describes a relocation that should
-   skip the executable when looking up the symbol value.  */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \
-                                         || (type) == R_PARISC_EPLT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#define elf_machine_type_class(type) \
+  ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT)       \
+    * ELF_RTYPE_CLASS_PLT)                                     \
+   | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
 
 /* Used by ld.so for ... something ... */
 #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
index b0e2927..d9c8194 100644 (file)
@@ -189,13 +189,13 @@ _dl_start_user:
        .size _dl_start_user, . - _dl_start_user
        .previous");
 
-/* Nonzero iff TYPE describes a relocation that should
-   skip the executable when looking up the symbol value.  */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#define elf_machine_type_class(type) \
+  ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)  \
+   | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY))
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
 #define ELF_MACHINE_JMP_SLOT   R_68K_JMP_SLOT
index 878e27d..cb3fc1c 100644 (file)
@@ -54,8 +54,7 @@
    This makes no sense on MIPS but we have to define this to R_MIPS_REL32
    to avoid the asserts in dl-lookup.c from blowing.  */
 #define ELF_MACHINE_JMP_SLOT                   R_MIPS_REL32
-#define elf_machine_lookup_noplt_p(type)       (1)
-#define elf_machine_lookup_noexec_p(type)      (0)
+#define elf_machine_type_class(type)           ELF_RTYPE_CLASS_PLT
 
 /* Translate a processor specific dynamic tag to the index
    in l_info array.  */
index eda94c2..34a8161 100644 (file)
@@ -45,8 +45,7 @@
    This makes no sense on MIPS but we have to define this to R_MIPS_REL32
    to avoid the asserts in dl-lookup.c from blowing.  */
 #define ELF_MACHINE_JMP_SLOT                   R_MIPS_REL32
-#define elf_machine_lookup_noplt_p(type)       (1)
-#define elf_machine_lookup_noexec_p(type)      (0)
+#define elf_machine_type_class(type)           ELF_RTYPE_CLASS_PLT
 
 /* Translate a processor specific dynamic tag to the index
    in l_info array.  */