Ignore:
Timestamp:
Jul 25, 2010, 10:27:20 AM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
658135a
Parents:
29b19f9
git-author:
Joe Ciccone <jciccone@…> (07/25/10 10:24:51)
git-committer:
Joe Ciccone <jciccone@…> (07/25/10 10:27:20)
Message:

Update the grub patches.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/grub-0.97-fixes-2.patch

    r29b19f9 ra1811b6  
    850850--- grub-0.97.orig/grub/asmstub.c       2005-02-16 12:45:14.000000000 -0800
    851851+++ grub-0.97/grub/asmstub.c    2006-07-04 00:01:50.000000000 -0700
    852 @@ -42,6 +42,12 @@
    853  #include <sys/time.h>
    854  #include <termios.h>
    855  #include <signal.h>
    856 +#include <sys/mman.h>
    857 +
    858 +#include <limits.h>
    859 +#ifndef PAGESIZE
    860 +#define PAGESIZE 4096
    861 +#endif
    862  
    863  #ifdef __linux__
    864  # include <sys/ioctl.h>                /* ioctl */
    865852@@ -55,6 +61,10 @@
    866853 # endif /* ! BLKFLSBUF */
     
    874861    libc name clashes. */
    875862 #define WITHOUT_LIBC_STUBS 1
    876 @@ -144,6 +154,22 @@
    877    assert (grub_scratch_mem == 0);
    878    scratch = malloc (0x100000 + EXTENDED_MEMSIZE + 15);
    879    assert (scratch);
    880 +
    881 +  {
    882 +    char *p;
    883 +    int ret;
    884 +
    885 +    /* Align to a multiple of PAGESIZE, assumed to be a power of two. */
    886 +    p = (char *) (((long) scratch) & ~(PAGESIZE - 1));
    887 +
    888 +    /* The simulated stack needs to be executable, since GCC uses stack
    889 +     * trampolines to implement nested functions.
    890 +     */
    891 +    ret = mprotect (p, 0x100000 + EXTENDED_MEMSIZE + 15,
    892 +                   PROT_READ | PROT_WRITE | PROT_EXEC);
    893 +    assert (ret == 0);
    894 +  }
    895 +
    896    grub_scratch_mem = (char *) ((((int) scratch) >> 4) << 4);
    897  
    898    /* FIXME: simulate the memory holes using mprot, if available. */
    899863@@ -777,7 +803,39 @@
    900864 
Note: See TracChangeset for help on using the changeset viewer.