This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cosmetic dl-machine cleanups



Looking through the dynamic linker implementations, I noticed some
obsolete stuff.

Ok to commit?

Andreas

2001-03-06  Andreas Jaeger  <aj@suse.de>

	* sysdeps/s390/dl-machine.h (elf_machine_relplt): Removed, it's not
	needed.
	(elf_machine_pltrel_p): Likewise.
	* sysdeps/powerpc/dl-machine.h: Likewise.
	* sysdeps/generic/dl-machine.h (elf_machine_pltrel_p): Likewise.

============================================================
Index: sysdeps/s390/dl-machine.h
--- sysdeps/s390/dl-machine.h	2000/11/02 14:16:07	1.1.1.1
+++ sysdeps/s390/dl-machine.h	2001/03/06 12:51:51
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  S390 Version.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Carl Pederson & Martin Schwidefsky.
    This file is part of the GNU C Library.
 
@@ -221,9 +221,6 @@
 ");
 #endif
 
-/* The PLT uses Elf32_Rela relocs.  */
-#define elf_machine_relplt elf_machine_rela
-
 /* Mask identifying addresses reserved for the user program,
    where the dynamic linker should not map anything.  */
 #define ELF_MACHINE_USER_ADDRESS_MASK   0xf8000000UL
@@ -304,10 +301,6 @@
 #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_pltrel_p(type) ((type) == R_390_JMP_SLOT)
-
 /* 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_390_COPY)
@@ -430,7 +423,7 @@
 	  }
 
 	case R_390_PC32:
-	  *reloc_addr = value +reloc->r_addend - (Elf32_Addr) reloc_addr;
+	  *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
 	  break;
 	case R_390_NONE:
 	  break;
============================================================
Index: sysdeps/powerpc/dl-machine.h
--- sysdeps/powerpc/dl-machine.h	2000/11/02 14:16:06	1.1.1.1
+++ sysdeps/powerpc/dl-machine.h	2001/03/06 12:51:51
@@ -1,6 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  PowerPC version.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -226,10 +225,6 @@
 
 /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
 #define ELF_MACHINE_JMP_SLOT	R_PPC_JMP_SLOT
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_pltrel_p(type) ((type) == R_PPC_JMP_SLOT)
 
 /* 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: sysdeps/generic/dl-machine.h
--- sysdeps/generic/dl-machine.h	2000/11/02 14:15:38	1.1.1.1
+++ sysdeps/generic/dl-machine.h	2001/03/06 12:51:51
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  Stub version.
-   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -97,11 +97,6 @@
   _dl_signal_error (0, "Elf32_Rela relocation requested -- unused on "
 		    ELF_MACHINE_NAME);
 }
-
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
-   PLT entries should not be allowed to define the value.  */
-#define elf_machine_pltrel_p(type) ((type) == R_???_JMP_SLOT)
 
 
 /* Set up the loaded object described by L so its unrelocated PLT

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]