mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 14:55:26 +03:00
[PATCH] klibc v0.199
This commit is contained in:
parent
f385ff6512
commit
833aa0fab5
@ -62,5 +62,10 @@ ERRLIST = 1
|
||||
#
|
||||
include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
|
||||
|
||||
ifeq ($(DEBUG),y)
|
||||
STRIP = /bin/true -Since_we_are_debugging
|
||||
OPTFLAGS += -O1 -g
|
||||
endif
|
||||
|
||||
# How to tell the linker main() is the entrypoint
|
||||
EMAIN ?= -e main
|
||||
|
14
klibc/include/arch/parisc/klibc/archsetjmp.h
Normal file
14
klibc/include/arch/parisc/klibc/archsetjmp.h
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* arch/parisc/include/klibc/archsetjmp.h
|
||||
*/
|
||||
|
||||
#ifndef _KLIBC_ARCHSETJMP_H
|
||||
#define _KLIBC_ARCHSETJMP_H
|
||||
|
||||
struct __jmp_buf {
|
||||
double regs[21];
|
||||
};
|
||||
|
||||
typedef struct __jmp_buf jmp_buf[1];
|
||||
|
||||
#endif /* _SETJMP_H */
|
@ -1,6 +1,6 @@
|
||||
Summary: A minimal libc subset for use with initramfs.
|
||||
Name: klibc
|
||||
Version: 0.198
|
||||
Version: 0.199
|
||||
Release: 1
|
||||
License: BSD/GPL
|
||||
Group: Development/Libraries
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Build configuration for this architecture
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
|
||||
# Extra linkflags when building the shared version of the library
|
||||
|
@ -11,7 +11,7 @@ THUMB = n
|
||||
CPU_ARCH := armv4
|
||||
CPU_TUNE := strongarm
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
|
||||
OPTFLAGS = -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
|
||||
BITSIZE = 32
|
||||
|
||||
ifeq ($(THUMB),y)
|
||||
|
@ -7,5 +7,5 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
|
@ -61,6 +61,7 @@
|
||||
//
|
||||
.align 32
|
||||
.global setjmp
|
||||
.proc setjmp
|
||||
setjmp:
|
||||
//
|
||||
// Make sure buffer is aligned at 16byte boundary
|
||||
@ -190,6 +191,7 @@ setjmp:
|
||||
|
||||
.align 32
|
||||
.global longjmp
|
||||
.proc longjmp
|
||||
longjmp:
|
||||
//
|
||||
// Make sure buffer is aligned at 16byte boundary
|
||||
|
@ -19,6 +19,7 @@
|
||||
/* pid_t vfork(void) */
|
||||
/* Implemented as clone(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
|
||||
|
||||
.align 32
|
||||
.proc vfork
|
||||
.global vfork
|
||||
vfork:
|
||||
@ -38,4 +39,4 @@ vfork:
|
||||
;;
|
||||
(p7) mov r8=-1
|
||||
br.ret.sptk.many b0
|
||||
.endp
|
||||
.endp vfork
|
||||
|
@ -7,7 +7,7 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 32
|
||||
|
||||
# Extra linkflags when building the shared version of the library
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
ARCHREQFLAGS = -fno-pic -mno-abicalls -G 0
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 32
|
||||
|
||||
# Extra linkflags when building the shared version of the library
|
||||
|
@ -7,5 +7,5 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
|
@ -27,7 +27,7 @@ setjmp:
|
||||
stw %r17,60(%r26)
|
||||
stw %r18,64(%r26)
|
||||
stw %r19,68(%r26)
|
||||
stw %dp,72(%r26)
|
||||
stw %r27,72(%r26)
|
||||
stw %r30,76(%r26)
|
||||
stw %rp,80(%r26)
|
||||
ldo 88(%r26),%r19
|
||||
|
@ -16,7 +16,6 @@ sub make_sysstub($$$$@) {
|
||||
print OUT "\t.import __syscall_common, code\n";
|
||||
print OUT "\t.global ${fname}\n";
|
||||
print OUT "\t.export ${fname}, code\n";
|
||||
print OUT "\t.type ${fname}, @function\n";
|
||||
print OUT "\t.proc\n";
|
||||
print OUT "\.callinfo\n";
|
||||
print OUT "${fname}:\n";
|
||||
|
@ -7,7 +7,7 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 32
|
||||
|
||||
# Extra linkflags when building the shared version of the library
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
ARCHREQFLAGS = -m64 -mcall-aixdesc
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
LDFLAGS = -m elf64ppc
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 32
|
||||
|
||||
SHAREDFLAGS = -Ttext 0x40000200
|
||||
|
@ -7,7 +7,7 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
|
||||
SHAREDFLAGS = -Ttext 0x40000200
|
||||
|
@ -7,7 +7,7 @@
|
||||
# accordingly.
|
||||
#
|
||||
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 32
|
||||
|
||||
# Extra linkflags when building the shared version of the library
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
ARCHREQFLAGS = -m64 -mptr64
|
||||
OPTFLAGS = -Os -fomit-frame-pointer
|
||||
OPTFLAGS = -Os
|
||||
BITSIZE = 64
|
||||
|
||||
LDFLAGS = -m elf64_sparc
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define TARGET_PTR_SIZE 64
|
||||
#include "arch/sparc/crt0i.S"
|
||||
#include "../sparc/crt0i.S"
|
||||
|
@ -18,10 +18,11 @@ void *memmem(const void *haystack, size_t n, const void *needle, size_t m)
|
||||
|
||||
size_t j, k, l;
|
||||
|
||||
if ( m > n )
|
||||
if (m > n || !m || !n)
|
||||
return NULL;
|
||||
|
||||
if ( x[0] == x[1] ) {
|
||||
if (1 != m) {
|
||||
if (x[0] == x[1]) {
|
||||
k = 2;
|
||||
l = 1;
|
||||
} else {
|
||||
@ -30,15 +31,22 @@ void *memmem(const void *haystack, size_t n, const void *needle, size_t m)
|
||||
}
|
||||
|
||||
j = 0;
|
||||
while ( j <= n-m ) {
|
||||
if (x[1] != y[j+1]) {
|
||||
while (j <= n - m) {
|
||||
if (x[1] != y[j + 1]) {
|
||||
j += k;
|
||||
} else {
|
||||
if ( !memcmp(x+2, y+j+2, m-2) && x[0] == y[j] )
|
||||
if (!memcmp(x + 2, y + j + 2, m - 2)
|
||||
&& x[0] == y[j])
|
||||
return (void *)&y[j];
|
||||
j += l;
|
||||
}
|
||||
}
|
||||
} else
|
||||
do {
|
||||
if (*y == *x)
|
||||
return (void *)y;
|
||||
y++;
|
||||
} while (--n);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ char *strncat(char *dst, const char *src, size_t n)
|
||||
char *q = strchr(dst, '\0');
|
||||
const char *p = src;
|
||||
char ch;
|
||||
size_t nn = q-dst;
|
||||
|
||||
while (n--) {
|
||||
*q++ = ch = *p++;
|
||||
|
@ -1 +1 @@
|
||||
0.198
|
||||
0.199
|
||||
|
Loading…
Reference in New Issue
Block a user