From 5abcf869491bbdf340b4cc147aa6af0980d6a021 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Sep 2003 02:47:48 +0000 Subject: [PATCH] 2003-09-17 Uwe Reimann Hans-Peter Nilsson * sysdeps/cris/dl-machine.h (elf_machine_type_class): Classify R_CRIS_GLOB_DAT as ELF_RTYPE_CLASS_PLT. Clarify comment. --- sysdeps/cris/dl-machine.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 7354c49..206e621 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -228,12 +228,20 @@ _dl_start_user:\n\ .size _dl_start_user, . - _dl_start_user\n\ .previous"); -/* 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) \ +/* The union of reloc-type-classes where the reloc TYPE is a member. + + TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a + relocation for a PLT entry, that is, for which a PLT entry should not + be allowed to define the value. The GNU linker for CRIS can merge a + .got.plt entry (R_CRIS_JUMP_SLOT) with a .got entry (R_CRIS_GLOB_DAT), + so we need to match both these reloc types. + + TYPE is in the class ELF_RTYPE_CLASS_NOCOPY if it 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)) \ + || ((type) == R_CRIS_GLOB_DAT)) * 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. */ -- 2.7.4