Date: Sun, 26 Nov 2023 04:43:57 +0100 From: Robert Clausecker <fuz@freebsd.org> To: Bakul Shah <bakul@iitbombay.org> Cc: freebsd-arm@freebsd.org Subject: Re: sbrk Message-ID: <ZWK-_fCYgEOkMR4L@fuz.su> In-Reply-To: <2F758BA2-F7F5-4A2C-85CF-6969EE50309C@iitbombay.org> References: <2F758BA2-F7F5-4A2C-85CF-6969EE50309C@iitbombay.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bakul, The sbrk() call indeed does not exist on arm64. Use mmap() or malloc() instead. Yours, Robert Clausecker Am Sat, Nov 25, 2023 at 07:41:11PM -0800 schrieb Bakul Shah: > Does sbrk not exist on FreeBSD-14 on arm64? Is this by design? > > $ cat sb.c > #include <unistd.h> > #include <stdio.h> > int main(int c, char**v) { > void *x = sbrk(102400); > printf("%p\n", x); > } > $ cc sb.c > ld: error: undefined symbol: sbrk > >>> referenced by sb.c > >>> /tmp/sb-e97caf.o:(main) > cc: error: linker command failed with exit code 1 (use -v to see invocation) > -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZWK-_fCYgEOkMR4L>