]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/include/asm/elf.h
x86/asm/32: Remove a bunch of '& 0xffff' from pt_regs segment reads
[linux.git] / arch / x86 / include / asm / elf.h
index e8ab9a46bc6890f802cbdc5bef85f4f16b221183..a62a12c472333280206c10e129bdf3efae40494a 100644 (file)
@@ -126,15 +126,15 @@ do {                                              \
        pr_reg[4] = regs->di;                   \
        pr_reg[5] = regs->bp;                   \
        pr_reg[6] = regs->ax;                   \
-       pr_reg[7] = regs->ds & 0xffff;          \
-       pr_reg[8] = regs->es & 0xffff;          \
-       pr_reg[9] = regs->fs & 0xffff;          \
+       pr_reg[7] = regs->ds;                   \
+       pr_reg[8] = regs->es;                   \
+       pr_reg[9] = regs->fs;                   \
        pr_reg[11] = regs->orig_ax;             \
        pr_reg[12] = regs->ip;                  \
-       pr_reg[13] = regs->cs & 0xffff;         \
+       pr_reg[13] = regs->cs;                  \
        pr_reg[14] = regs->flags;               \
        pr_reg[15] = regs->sp;                  \
-       pr_reg[16] = regs->ss & 0xffff;         \
+       pr_reg[16] = regs->ss;                  \
 } while (0);
 
 #define ELF_CORE_COPY_REGS(pr_reg, regs)       \
@@ -245,12 +245,13 @@ extern int force_personality32;
 #define CORE_DUMP_USE_REGSET
 #define ELF_EXEC_PAGESIZE      4096
 
-/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
-   use of this is to invoke "./ld.so someprog" to test out a new version of
-   the loader.  We need to make sure that it is out of the way of the program
-   that it will "exec", and that there is sufficient room for the brk.  */
-
-#define ELF_ET_DYN_BASE                (TASK_SIZE / 3 * 2)
+/*
+ * This is the base location for PIE (ET_DYN with INTERP) loads. On
+ * 64-bit, this is raised to 4GB to leave the entire 32-bit address
+ * space open for things that want to use the area for 32-bit pointers.
+ */
+#define ELF_ET_DYN_BASE                (mmap_is_ia32() ? 0x000400000UL : \
+                                                 0x100000000UL)
 
 /* This yields a mask that user programs can use to figure out what
    instruction set this CPU supports.  This could be done in user space,