about summary refs log tree commit diff
path: root/sysdeps/cris
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-09-17 02:47:48 +0000
committerRoland McGrath <roland@gnu.org>2003-09-17 02:47:48 +0000
commita27253d23a7ea92c843f63adbec0e0a8e67330fc (patch)
treed4d9ba93ebf77e596cd69480bb3e1bf284de6d1e /sysdeps/cris
parent6e16ed887ed7d5747a0211835f3ad6c471b91204 (diff)
downloadglibc-a27253d23a7ea92c843f63adbec0e0a8e67330fc.tar.gz
glibc-a27253d23a7ea92c843f63adbec0e0a8e67330fc.tar.xz
glibc-a27253d23a7ea92c843f63adbec0e0a8e67330fc.zip
2003-09-17 Uwe Reimann <Uwe_Reimann@gmx.net> Hans-Peter Nilsson <hp@axis.com>
	* sysdeps/cris/dl-machine.h (elf_machine_type_class): Classify
	R_CRIS_GLOB_DAT as ELF_RTYPE_CLASS_PLT.  Clarify comment.
Diffstat (limited to 'sysdeps/cris')
-rw-r--r--sysdeps/cris/dl-machine.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 7354c4953c..206e621902 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.  */