Displaying 20 results from an estimated 31 matches for "__static_init".
2005 Jan 19
1
build klibc with gcc 2.96 fails
I get the following error:
make[1]: Entering directory `/home/greg/src/klibc/klibc-0.196/klibc'
gcc -Wp,-MT,__static_init.o,-MD,./.__static_init.o.d  -march=i386 -Os -g -malign-functions=0 -malign-jumps=0 -malign-loops=0  -nostdinc -iwithprefix include -D__KLIBC__ -DBITSIZE=32 -I.. /include/arch/i386 -I../include/bits32 -I../include -I../linux/include -I../linux/include2 -I ../linux/include -DWITH_ERRLIST -W -Wall -Wp...
2003 Jul 31
3
Trying to test with 2.6.0-test2
Hi folks,
     I haven't tested initramfs with klibc before and am having trouble
getting going.   I tried to pull from the klibc-2.5 bk repository but
it doesn't merge with 2.6t2.   Also i downloaded the .80 version and
tried to compile but got a stream of errors and warnings.   It looks like
it needs to be compiled from within the kernel tree but i couldn't find any
docs about the
2010 Oct 20
2
[PATCH] klibc: reproducible builds
...@; $(KLIBCAR_crs) $@)
 
 $(lib-target): $(lib-y) FORCE
 	$(call if_changed,link_o_target)
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index ab5212b..f64785e 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -109,7 +109,7 @@ klib-o-files = $(shell cat $(obj)/klib.list \
 targets += libc.a __static_init.o
 quiet_cmd_libc = KLIBCAR $@
       cmd_libc = rm -f $@;						\
-                 $(KLIBCAR) cq $@					\
+                 $(KLIBCAR_cq) $@					\
 		 $(call objectify,__static_init.o) $(klib-o-files);	\
                  $(KLIBCRANLIB) $@
 
-- 
1.7.1
2006 Jul 09
6
[PATCH/RFC] klibc/kbuild: use separate kbuild files for each klibc subdirectory
...ctify, $(libc-y) $(KLIBCARCHOBJS)) \
-            $(call objectify, syscalls/syscalls.list socketcalls/socketcalls.list)
 
+# all .o files for all dirs
+klib-o-files = $(shell cat $(obj)/klib.list \
+		$(addsuffix /klib.list, $(klib-dirs)))
 ######
 # Build static library: libc.a
 targets += libc.a __static_init.o
 quiet_cmd_libc = KLIBCAR $@
-      cmd_libc = rm -f $@; \
-                 $(KLIBCAR) cq $@ \
-		 	$(patsubst %.list,`cat %.list`,$(filter-out FORCE,$^)); \
+      cmd_libc = rm -f $@;						\
+                 $(KLIBCAR) cq $@					\
+		 $(call objectify,__static_init.o) $(klib-o-files);	\...
2008 Dec 29
1
klibc broken on ppc with linux-2.6.27 and workaround
...Distrib does not matter as it is inside a chroot a la LSF
With the upgrade to linux-2.6.27 it broke on 1.5.10 (I try too the last
1.5.14) with
make[1]: Entering directory `/usr/src/klibc-1.5.14'
  GEN     klcc/klibc.config
  GEN     klcc/klcc
  HOSTCC  scripts/basic/fixdep
  KLIBCCC usr/klibc/__static_init.o
  KLIBCCC usr/klibc/vsnprintf.o
In file included from usr/klibc/../include/sys/types.h:15,
                 from usr/klibc/../include/unistd.h:11,
                 from usr/klibc/../include/stdio.h:11,
                 from usr/klibc/vsnprintf.c:13:
linux/include/linux/posix_types.h:47:29: error:...
2014 Jan 25
0
[klibc:master] auxv: convert auxiliary vector into an array; define getauxval()
...libc/libc_init.c
index 8d18820..1087f95 100644
--- a/usr/klibc/libc_init.c
+++ b/usr/klibc/libc_init.c
@@ -24,6 +24,7 @@
 #include <stdint.h>
 #include <klibc/compiler.h>
 #include <elf.h>
+#include <sys/auxv.h>
 #include "atexit.h"
 
 /* This file is included from __static_init.c or __shared_init.c */
@@ -35,12 +36,14 @@ char **environ;
 unsigned int __page_size, __page_shift;
 
 struct auxentry {
-	uintptr_t type;
-	uintptr_t v;
+	unsigned long type;
+	unsigned long v;
 };
 
 extern void __init_stdio(void);
 
+unsigned long __auxval[_AUXVAL_MAX];
+
 __noreturn __libc_ini...
2003 Oct 04
0
klibc: kbuild improvements
...j)/crt0.o $(obj)/arch/$(ARCH)/crt0.o
+targets			+= crt0.o
+deps_crt0.o		:= arch/$(ARCH)/crt0.o
+$(call defdep,crt0.o)
+quiet_cmd_crt0.o	 = CP      $@
+      cmd_crt0.o         = cp $(word 2,$^) $@
 
 # static lib
+dep_libc = $(LIBOBJS) $(ARCHOBJS) $(syscall-objs) $(socketcall-objs)
 
-deps_libc.a = __static_init.o $(LIBOBJS) $(ARCHOBJS) 		\
-	$(syscall-objs) $(socketcall-objs)
-quiet_cmd_libc.a = USERAR  $@
-      cmd_libc.a = rm -f $@; $(USERAR) rcs $@ $^
-
-$(obj)/libc.a: $(deps_libc.a:%=$(obj)/%)
-	$(call if_changed,libc.a)
+targets			+= libc.a
+deps_libc.a		:= __static_init.o $(dep_libc)
+$(call defdep...
2015 Mar 06
0
[klibc:master] add-mips64-support-arch-mips64-specific
...klibc/arch/mips64/crt0.S b/usr/klibc/arch/mips64/crt0.S
new file mode 100644
index 0000000..775a919
--- /dev/null
+++ b/usr/klibc/arch/mips64/crt0.S
@@ -0,0 +1,31 @@
+#
+# arch/mips64/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+#include <machine/asm.h>
+
+NESTED(__start, 64, sp)
+	daddiu  sp,sp,-64
+	sd	zero, 32(sp)
+
+					# Initialize gp
+	lui gp,%highest(_gp) 		# load highest "halfword"
+	daddiu gp,gp,%higher(_gp) 	# merge next "halfword&quo...
2008 Oct 20
1
compile klibc problem (EABI version error)
...from marvell, I comple klibc as follows:
klibc-1.5> ln -s
/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel_tflashupdate/
linux
klibc-1.5>cat 1.sh
export KLIBCARCH=arm
export CROSS_COMPILE=arm-iwmmxt-linux-gnueabi-
klibc-1.5>. ./1.sh
klibc-1.5>make
  KLIBCCC usr/klibc/__static_init.o
  KLIBCCC usr/klibc/vsnprintf.o
?
  LIST    usr/klibc/syscalls/klib.list
  LIST    usr/klibc/klib.list
  KLIBCAR usr/klibc/libc.a
  KLIBCLD usr/klibc/libc.so
arm-iwmmxt-linux-gnueabi-ld: ERROR: Source object
/opt/arm-linux-4.1.1/bin/../lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/libgcc.a(_udivs...
2015 Nov 05
0
[klibc:master] Inline __arch_libcinit()
...0644
--- a/usr/klibc/libc_init.c
+++ b/usr/klibc/libc_init.c
@@ -28,6 +28,12 @@
 #include <klibc/sysconfig.h>
 #include "atexit.h"
 
+#if _KLIBC_HAS_ARCHINIT
+# include "klibc/archinit.h"
+#else
+# define __libc_archinit() ((void)0)
+#endif
+
 /* This file is included from __static_init.c or __shared_init.c */
 #ifndef SHARED
 # error "SHARED should be defined to 0 or 1"
@@ -42,7 +48,6 @@ struct auxentry {
 };
 
 extern void __libc_init_stdio(void);
-extern void __libc_archinit(void);
 
 unsigned long __auxval[_AUXVAL_MAX];
2014 Apr 09
0
[klibc:master] Move architecture-specific initialization to arch/
..._init.c
index 1c6180b..c54d022 100644
--- a/usr/klibc/libc_init.c
+++ b/usr/klibc/libc_init.c
@@ -25,6 +25,7 @@
 #include <klibc/compiler.h>
 #include <elf.h>
 #include <sys/auxv.h>
+#include <klibc/sysconfig.h>
 #include "atexit.h"
 
 /* This file is included from __static_init.c or __shared_init.c */
@@ -40,7 +41,8 @@ struct auxentry {
 	unsigned long v;
 };
 
-extern void __init_stdio(void);
+extern void __libc_init_stdio(void);
+extern void __libc_archinit(void);
 
 unsigned long __auxval[_AUXVAL_MAX];
 
@@ -90,20 +92,11 @@ __noreturn __libc_init(uintptr_t * elfdata, v...
2019 Jan 18
0
[klibc:master] arch: Remove m32r port
...usr/klibc/arch/m32r/crt0.S b/usr/klibc/arch/m32r/crt0.S
deleted file mode 100644
index 568e5d8..0000000
--- a/usr/klibc/arch/m32r/crt0.S
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# arch/m32r/crt0.S
-#
-# Does arch-specific initialization and invokes __libc_init
-# with the appropriate arguments.
-#
-# See __static_init.c or __shared_init.c for the expected
-# arguments.
-#
-
-	.text
-	.balign 4
-	.type	_start, at function
-	.globl	_start
-_start:
-	/* Save the address of the ELF argument array */
-	mv	r0, sp
-
-	/* atexit() function (assume null) */
-	xor	r1, r1
-
-	bl	__libc_init
-
-	.size _start, .-_start
diff...
2006 Jun 26
0
[klibc 26/43] m32r support for klibc
...t a/usr/klibc/arch/m32r/crt0.S b/usr/klibc/arch/m32r/crt0.S
new file mode 100644
index 0000000..568e5d8
--- /dev/null
+++ b/usr/klibc/arch/m32r/crt0.S
@@ -0,0 +1,24 @@
+#
+# arch/m32r/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+	.text
+	.balign 4
+	.type	_start, at function
+	.globl	_start
+_start:
+	/* Save the address of the ELF argument array */
+	mv	r0, sp
+
+	/* atexit() function (assume null) */
+	xor	r1, r1
+
+	bl	__libc_init
+
+	.size _start, .-_start
diff...
2006 Jun 26
0
[klibc 34/43] sh support for klibc
...iff --git a/usr/klibc/arch/sh/crt0.S b/usr/klibc/arch/sh/crt0.S
new file mode 100644
index 0000000..7f0a649
--- /dev/null
+++ b/usr/klibc/arch/sh/crt0.S
@@ -0,0 +1,27 @@
+#
+# arch/sh/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+	.text
+	.align 2
+	.type _start,#function
+	.globl _start
+
+_start:
+	mov	r15, r4
+	mov	#0, r5
+	mov.l	1f, r0
+
+	jsr	@r0
+	 nop
+
+	.align 2
+1:	.long	__libc_init
+
+	.size _start,.-_start
diff --git a/usr/klibc/arch/sh/setjmp.S b/usr/kli...
2018 Jul 17
1
[PATCH klibc 1/2] rename, renameat: Use renameat2() system call
New architectures only define the renameat2() system call, which was
added in Linux 3.15.  Define rename() and renameat() as wrappers for
it if necessary.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -59,7 +59,8 @@ klib-y += vsnprintf.o snprintf.o vsprint
 	  inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
 	 
2023 Feb 20
1
[PATCH] Add LoongArch64 port
.../crt0.S b/usr/klibc/arch/loongarch64/crt0.S
new file mode 100644
index 00000000..cb3da669
--- /dev/null
+++ b/usr/klibc/arch/loongarch64/crt0.S
@@ -0,0 +1,18 @@
+#
+# arch/loongarch64/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+#include <machine/asm.h>
+
+ENTRY(_start)
+	move		$a0, $sp		# Pointer to ELF entry structure
+	move		$a1, $zero		# No onexit pointer
+	bstrins.d	$sp, $zero, 3, 0	# Align stack to 16 bytes
+	bl		__libc_init
+END(_start)
diff --git a/usr...
2006 Jun 26
0
[klibc 27/43] m68k support for klibc
...t a/usr/klibc/arch/m68k/crt0.S b/usr/klibc/arch/m68k/crt0.S
new file mode 100644
index 0000000..fbf6f13
--- /dev/null
+++ b/usr/klibc/arch/m68k/crt0.S
@@ -0,0 +1,27 @@
+#
+# arch/m68k/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+	.text
+	.align 4
+	.type _start, at function
+	.globl _start
+_start:
+	# Zero out the frame pointer to be nice to the debugger
+	movea.l	#0,%a6
+	# Save the address of the ELF argument array
+	move.l	%a7, %d0
+	# Push a zero on the stack i...
2019 Jan 18
0
[klibc:master] Add RISC-V (RV64) port
...c/arch/riscv64/crt0.S b/usr/klibc/arch/riscv64/crt0.S
new file mode 100644
index 0000000..76fa3c2
--- /dev/null
+++ b/usr/klibc/arch/riscv64/crt0.S
@@ -0,0 +1,22 @@
+#
+# arch/riscv64/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+#include <machine/asm.h>
+
+ENTRY(_start)
+	.option push
+	.option norelax
+	lla	gp, __global_pointer$
+	.option pop
+
+	mv	a0, sp			# Pointer to ELF entry structure
+	mv	a1, zero		# No onexit pointer
+	jal	__libc_init
+END(_start)
dif...
2006 Jun 26
0
[klibc 33/43] s390 support for klibc
...t a/usr/klibc/arch/s390/crt0.S b/usr/klibc/arch/s390/crt0.S
new file mode 100644
index 0000000..fd9237e
--- /dev/null
+++ b/usr/klibc/arch/s390/crt0.S
@@ -0,0 +1,35 @@
+#
+# arch/s390/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+	.text
+	.align 4
+	.type _start, at function
+	.globl _start
+
+#ifndef __s390x__
+
+_start:
+	lr	%r2,%r15
+	lhi	%r3,0
+	ahi	%r15,-96
+	bras	%r1,.L0
+.L0:
+	l	%r1,.L1-.L0(%r1)
+	br	%r1
+.L1:
+	.long	__libc_init
+#else
+
+_start:
+	lgr	%r2,%r1...
2006 Jun 26
0
[klibc 23/43] cris support for klibc
...t a/usr/klibc/arch/cris/crt0.S b/usr/klibc/arch/cris/crt0.S
new file mode 100644
index 0000000..22cb9b4
--- /dev/null
+++ b/usr/klibc/arch/cris/crt0.S
@@ -0,0 +1,27 @@
+#
+# arch/cris/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+	.text
+	.balign 4
+	.type	_start, at function
+	.globl	_start
+_start:
+	/* Save the address of the ELF argument array */
+	move.d	$sp,$r10	/* Address of ELF arguments */
+
+	/* atexit() function (assume null) */
+	moveq	0,$r11
+
+	/* Set u...