Browse Source

minor fixes

Chia-Che Tsai 7 years ago
parent
commit
f2c36a1268
2 changed files with 12 additions and 59 deletions
  1. 12 5
      LibOS/glibc-2.19.patch
  2. 0 54
      Pal/regression/..Bootstrap.c

+ 12 - 5
LibOS/glibc-2.19.patch

@@ -953,7 +953,7 @@ index 9d7f52f..72d50ae 100644
    /* If the thread is detached free the TCB.  */
    if (IS_DETACHED (pd))
 diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
-index 89fda5e..594dd72 100644
+index 89fda5e..f6963f6 100644
 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
 @@ -111,7 +111,8 @@ ENTRY(__pthread_disable_asynccancel)
@@ -961,7 +961,7 @@ index 89fda5e..594dd72 100644
  	addq	$CANCELHANDLING, %rdi
  	LOAD_PRIVATE_FUTEX_WAIT (%esi)
 -	syscall
-+	SYSCALL
++	SYSCALLDB
 +
  	movl	%fs:CANCELHANDLING, %eax
  	jmp	3b
@@ -1801,11 +1801,18 @@ index b3854fa..6369bfe 100644
  	jae	SYSCALL_ERROR_LABEL	/* Jump to error handler if error.  */
  
 diff --git a/sysdeps/unix/sysv/linux/x86_64/syscall.S b/sysdeps/unix/sysv/linux/x86_64/syscall.S
-index 92c2f5b..33f820f 100644
+index 92c2f5b..e32ebb2 100644
 --- a/sysdeps/unix/sysv/linux/x86_64/syscall.S
 +++ b/sysdeps/unix/sysv/linux/x86_64/syscall.S
-@@ -34,7 +34,7 @@ ENTRY (syscall)
- 	movq %r8, %r10
+@@ -31,10 +31,13 @@ ENTRY (syscall)
+ 	movq %rsi, %rdi		/* shift arg1 - arg5.  */
+ 	movq %rdx, %rsi
+ 	movq %rcx, %rdx
+-	movq %r8, %r10
++	/* DEP 1/28/17: This is not the Linux kernel; use user-space calling
++	 * 	convention	 */
++	/*	movq %r8, %r10 */
++	movq %r8, %rcx
  	movq %r9, %r8
  	movq 8(%rsp),%r9	/* arg6 is on the stack.  */
 -	syscall			/* Do the system call.  */

+ 0 - 54
Pal/regression/..Bootstrap.c

@@ -4,9 +4,6 @@
 #include "pal.h"
 #include "pal_debug.h"
 
-static int test_data = 0;
-static int test_func (void) { return 0; }
-
 int main (int argc, char ** argv, char ** envp)
 {
     /* check if the program is loaded */
@@ -16,56 +13,5 @@ int main (int argc, char ** argv, char ** envp)
     /* check executable name */
     pal_printf("Loaded Executable: %s\n", pal_control.executable);
 
-    /* check manifest name */
-    char manifest[30] = "";
-    DkStreamGetName(pal_control.manifest_handle, manifest, 30);
-    pal_printf("Loaded Manifest: %s\n", manifest);
-
-    /* check arguments */
-    pal_printf("# of Arguments: %d\n", argc);
-    for (int i = 0 ; i < argc ; i++)
-        pal_printf("argv[%d] = %s\n", i, argv[i]);
-
-    /* unique process ID */
-    pal_printf("Process ID: %016x\n", pal_control.process_id);
-
-    /* unique host ID */
-    pal_printf("Host ID: %016x\n", pal_control.host_id);
-
-    /* parent process */
-    pal_printf("Parent Process: %016lx\n", pal_control.parent_process);
-
-    /* test debug stream */
-    char msg[] = "Written to Debug Stream\n";
-    DkStreamWrite(pal_control.debug_stream, 0, sizeof(msg), msg, NULL);
-
-    /* page size */
-    pal_printf("Page Size: %d\n", pal_control.pagesize);
-    /* Allocation Alignment */
-    pal_printf("Allocation Alignment: %d\n", pal_control.alloc_align);
-
-    /* user address range */
-    pal_printf("User Address Range: %p - %p\n",
-               pal_control.user_address.start,
-               pal_control.user_address.end);
-
-    if (pal_control.user_address.start &&
-        pal_control.user_address.end &&
-        pal_control.user_address.start < pal_control.user_address.end)
-        pal_printf("User Address Range OK\n");
-
-    /* executable address range */
-    pal_printf("Executable Range: %p - %p\n",
-               pal_control.executable_range.start,
-               pal_control.executable_range.end);
-
-    if (pal_control.executable_range.start &&
-        pal_control.executable_range.end &&
-        pal_control.executable_range.start < (void *) &test_data &&
-        (void *) &test_data < pal_control.executable_range.end &&
-        pal_control.executable_range.start < (void *) &test_func &&
-        (void *) &test_func < pal_control.executable_range.end)
-        pal_printf("Executable Range OK\n");
-
     return 0;
 }