浏览代码

aarch64: finetuning, sync with glibc

Waldemar Brodkorb 6 年之前
父节点
当前提交
3d2872efe3
共有 3 个文件被更改,包括 8 次插入5 次删除
  1. 1 1
      ldso/ldso/aarch64/elfinterp.c
  2. 2 1
      libc/sysdeps/linux/aarch64/clone.S
  3. 5 3
      libc/sysdeps/linux/aarch64/vfork.S

+ 1 - 1
ldso/ldso/aarch64/elfinterp.c

@@ -233,7 +233,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
 					else
 #endif
 					{
-					        td->arg = symbol_addr + tls_tpnt->l_tls_offset;
+					        td->arg = (void*)(symbol_addr + tls_tpnt->l_tls_offset);
 					        td->entry = _dl_tlsdesc_return;
 					}
 				}

+ 2 - 1
libc/sysdeps/linux/aarch64/clone.S

@@ -69,7 +69,8 @@ thread_start:
 	blr	x10
 
 	/* We are done, pass the return value through x0.  */
-	b	HIDDEN_JUMPTARGET(_exit)
+	mov	x8, #SYS_ify(exit)
+	svc	0x0
 	cfi_endproc
 	.size thread_start, .-thread_start
 

+ 5 - 3
libc/sysdeps/linux/aarch64/vfork.S

@@ -23,7 +23,7 @@
    replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
    and the process ID of the new process to the old process.  */
 
-ENTRY (vfork)
+ENTRY (__vfork)
 
 	mov	x0, #0x4111	/* CLONE_VM | CLONE_VFORK | SIGCHLD */
 	mov	x1, sp
@@ -33,5 +33,7 @@ ENTRY (vfork)
 	b.cs    .Lsyscall_error
 	RET
 
-PSEUDO_END (vfork)
-libc_hidden_def (vfork)
+PSEUDO_END (__vfork)
+libc_hidden_def(vfork)
+
+weak_alias (__vfork, vfork)