Author: kib
Date: Tue Oct 20 13:32:28 2009
New Revision: 198283
URL: http://svn.freebsd.org/changeset/base/198283

Log:
  MFC r197933:
  Define architectural load bases for PIE binaries.
  
  MFC r198203 (by marius):
  Change load base for sparc to match default gcc memory layout model.
  
  Approved by:  re (kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/elf.h
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/arm/include/elf.h
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/include/elf.h
  stable/8/sys/ia64/include/elf.h
  stable/8/sys/mips/include/elf.h
  stable/8/sys/powerpc/include/elf.h
  stable/8/sys/sparc64/include/elf.h
  stable/8/sys/sun4v/include/elf.h

Modified: stable/8/sys/amd64/include/elf.h
==============================================================================
--- stable/8/sys/amd64/include/elf.h    Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/amd64/include/elf.h    Tue Oct 20 13:32:28 2009        
(r198283)
@@ -106,4 +106,10 @@ __ElfType(Auxinfo);
 #define        ELF_TARG_MACH   EM_X86_64
 #define        ELF_TARG_VER    1
 
+#if __ELF_WORD_SIZE == 32
+#define        ET_DYN_LOAD_ADDR 0x01001000
+#else
+#define        ET_DYN_LOAD_ADDR 0x01021000
+#endif
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/arm/include/elf.h
==============================================================================
--- stable/8/sys/arm/include/elf.h      Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/arm/include/elf.h      Tue Oct 20 13:32:28 2009        
(r198283)
@@ -97,4 +97,7 @@ __ElfType(Auxinfo);
  * value.
  */
 #define MAGIC_TRAMP_NUMBER     0x5c000003
+
+#define        ET_DYN_LOAD_ADDR 0x12000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/i386/include/elf.h
==============================================================================
--- stable/8/sys/i386/include/elf.h     Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/i386/include/elf.h     Tue Oct 20 13:32:28 2009        
(r198283)
@@ -105,4 +105,6 @@ __ElfType(Auxinfo);
 #define        ELF_TARG_MACH   EM_386
 #define        ELF_TARG_VER    1
 
+#define        ET_DYN_LOAD_ADDR 0x01001000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/ia64/include/elf.h
==============================================================================
--- stable/8/sys/ia64/include/elf.h     Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/ia64/include/elf.h     Tue Oct 20 13:32:28 2009        
(r198283)
@@ -141,4 +141,6 @@ __ElfType(Auxinfo);
 
 #define        DT_IA_64_PLT_RESERVE    0x70000000
 
+#define        ET_DYN_LOAD_ADDR 0x2500000000000000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/mips/include/elf.h
==============================================================================
--- stable/8/sys/mips/include/elf.h     Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/mips/include/elf.h     Tue Oct 20 13:32:28 2009        
(r198283)
@@ -250,4 +250,6 @@ __ElfType(Auxinfo);
 
 #define        AT_COUNT        16      /* Count of defined aux entry types. */
 
+#define        ET_DYN_LOAD_ADDR 0x0120000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/powerpc/include/elf.h
==============================================================================
--- stable/8/sys/powerpc/include/elf.h  Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/powerpc/include/elf.h  Tue Oct 20 13:32:28 2009        
(r198283)
@@ -96,4 +96,6 @@ __ElfType(Auxinfo);
 #define        ELF_TARG_MACH   EM_PPC
 #define        ELF_TARG_VER    1
 
+#define        ET_DYN_LOAD_ADDR 0x01010000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/sparc64/include/elf.h
==============================================================================
--- stable/8/sys/sparc64/include/elf.h  Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/sparc64/include/elf.h  Tue Oct 20 13:32:28 2009        
(r198283)
@@ -97,4 +97,6 @@ __ElfType(Auxinfo);
 #define        ELF_TARG_MACH   ELF_ARCH
 #define        ELF_TARG_VER    1
 
+#define        ET_DYN_LOAD_ADDR 0x100000
+
 #endif /* !_MACHINE_ELF_H_ */

Modified: stable/8/sys/sun4v/include/elf.h
==============================================================================
--- stable/8/sys/sun4v/include/elf.h    Tue Oct 20 13:32:18 2009        
(r198282)
+++ stable/8/sys/sun4v/include/elf.h    Tue Oct 20 13:32:28 2009        
(r198283)
@@ -97,4 +97,6 @@ __ElfType(Auxinfo);
 #define        ELF_TARG_MACH   ELF_ARCH
 #define        ELF_TARG_VER    1
 
+#define        ET_DYN_LOAD_ADDR 0x100000
+
 #endif /* !_MACHINE_ELF_H_ */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to