mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 19:21:04 +01:00
libsys/arm: make vfork less of an outlier
Following the pattern of other architectures, make __sys_vfork the main symbol and _vfork and vfork weak aliases. This avoids the need to special case vfork in the generated list of symbols. Differential Revision: https://reviews.freebsd.org/D44330
This commit is contained in:
parent
5ffb5c849c
commit
80ffc7398b
@ -42,13 +42,17 @@
|
||||
.text
|
||||
.align 0
|
||||
|
||||
ENTRY(vfork)
|
||||
ENTRY(__sys_vfork)
|
||||
.weak _C_LABEL(vfork);
|
||||
.set _C_LABEL(vfork), _C_LABEL(__sys_vfork);
|
||||
.weak _C_LABEL(_vfork);
|
||||
.set _C_LABEL(_vfork), _C_LABEL(__sys_vfork);
|
||||
mov r2, r14
|
||||
_SYSCALL(vfork)
|
||||
bcs PIC_SYM(CERROR, PLT)
|
||||
sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */
|
||||
and r0, r0, r1 /* r0 == 0 if child, else unchanged */
|
||||
mov r15, r2
|
||||
END(vfork)
|
||||
END(__sys_vfork)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
Loading…
Reference in New Issue
Block a user