This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Patch to ELF values in common.h


Hi Guys,

  After talking with H.J. about th new draft of the ELF ABI spec (Oct
  4, 1999) I have checked in the following patch to fix up some
  mistakes I made in my interpretation of that draft.

Cheers
	Nick

2000-01-11  Nick Clifton  <nickc@cygnus.com>

	* common.h (DT_ENCODING): Fix definition of this value.
	(DT_LOOS): Fix definition of this value.
	(DT_HIOS): Fix definition of this value.
	(OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft
	of ELF spec changed it.
	(OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft
	of ELF spec changed it.

Index: include/elf/common.h
===================================================================
RCS file: /cvs/binutils/binutils/include/elf/common.h,v
retrieving revision 1.8
diff -p -r1.8 common.h
*** common.h	2000/01/10 18:51:33	1.8
- --- common.h	2000/01/11 17:50:50
*************** Foundation, Inc., 59 Temple Place - Suit
*** 409,425 ****
  #define DT_FINI_ARRAYSZ 28
  #define DT_RUNPATH      29
  #define DT_FLAGS        30
! #define DT_ENCODING     31 /* Note: Oct 4, 1999 Draft specifies this as 32, but this conflicts with DT_PREINIT_ARRAY */
! #define DT_PREINIT_ARRAY 32
  #define DT_PREINIT_ARRAYSZ 33
  
- - #define DT_LOOS         0x60000000 /* Note: Oct 4, 1999 draft has this as 0x6fff000d */
- - #define DT_HIOS         0x6fffffff /* Note: Oct 4, 1999 draft has this as 0x6fff0000 */
  #define DT_LOPROC       0x70000000
  #define DT_HIPROC       0x7fffffff
  
  /* The next four dynamic tags are used on Solaris.  We support them
!    everywhere.  */
  #define DT_VALRNGLO	0x6ffffd00
  #define DT_PLTPADSZ	0x6ffffdf9
  #define DT_MOVEENT	0x6ffffdfa
- --- 409,434 ----
  #define DT_FINI_ARRAYSZ 28
  #define DT_RUNPATH      29
  #define DT_FLAGS        30
! 
! #define DT_ENCODING     32
! #define DT_PREINIT_ARRAY   32
  #define DT_PREINIT_ARRAYSZ 33
+ 
+ /* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
+    for DT_LOOS and DT_HIOS.  Some implementations however, use
+    values outside of the new range (see below).  */
+ #define OLD_DT_LOOS	0x60000000
+ #define DT_LOOS         0x6000000d
+ #define DT_HIOS         0x6fff0000
+ #define OLD_DT_HIOS     0x6fffffff
  
  #define DT_LOPROC       0x70000000
  #define DT_HIPROC       0x7fffffff
  
  /* The next four dynamic tags are used on Solaris.  We support them
!    everywhere.  Note these values lie outside of the (new) range for
!    OS specific values.  This is a deliberate special case and we
!    maintain it for backwards compatability.  */
  #define DT_VALRNGLO	0x6ffffd00
  #define DT_PLTPADSZ	0x6ffffdf9
  #define DT_MOVEENT	0x6ffffdfa


2000-01-11  Nick Clifton  <nickc@cygnus.com>

	* readelf.c (get_dynamic_type): Remove DT_ENCODING.

Index: binutils/readelf.c
===================================================================
RCS file: /cvs/binutils/binutils/binutils/readelf.c,v
retrieving revision 1.36
diff -p -r1.36 readelf.c
*** readelf.c	2000/01/10 18:52:23	1.36
- --- readelf.c	2000/01/11 17:50:51
*************** get_dynamic_type (type)
*** 1059,1065 ****
      case DT_FINI_ARRAYSZ: return "FINI_ARRAYSZ";
      case DT_RUNPATH:    return "RUNPATH";
      case DT_FLAGS:      return "FLAGS";
!     case DT_ENCODING:   return "ENCODING";
      case DT_PREINIT_ARRAY: return "PREINIT_ARRAY";
      case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ";
  
- --- 1059,1065 ----
      case DT_FINI_ARRAYSZ: return "FINI_ARRAYSZ";
      case DT_RUNPATH:    return "RUNPATH";
      case DT_FLAGS:      return "FLAGS";
! 
      case DT_PREINIT_ARRAY: return "PREINIT_ARRAY";
      case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ";
  


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