Date: Tue, 27 Aug 2013 18:15:46 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: nostdlib compilation On Tue, Aug 27, 2013 at 04:51:17PM -0500, Nulik Nol wrote: > Hi, > I am looking for a way to compile my app without glibc, and according > to some examples it can be done with: > gcc -nostdlib stubstart.S -o myprogram myprogram.c > but in order to use the kernel I also need the system calls. > What are the files I should also include from musl in order to be able > to invoke kernel system calls but without glibc? Most people do this with their own inline asm, but these files should be sufficient to make syscalls: src/misc/syscall.c src/internal/$(ARCH)/syscall.s I'm not 100% sure they work outside of musl; they might have other dependencies. Looking at arch/$(ARCH)/syscall_arch.h to see how to make your own inline-asm syscalls would be a better approach, I think. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.