Date: Sat, 25 Nov 2023 20:47:45 -0700 From: Warner Losh <imp@bsdimp.com> To: Joseph Holsten <joseph@josephholsten.com> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Bakul Shah <bakul@iitbombay.org> Subject: Re: sbrk Message-ID: <CANCZdfqcA-kLd3gLWkcD1%2BPGFg48TPAF=OPk9HzRFyaokZbvAQ@mail.gmail.com> In-Reply-To: <949f8f16-1219-4f4a-abf6-f9727c95681b@Spark> References: <2F758BA2-F7F5-4A2C-85CF-6969EE50309C@iitbombay.org> <949f8f16-1219-4f4a-abf6-f9727c95681b@Spark>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000148268060b060d72 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 25, 2023, 8:44 PM <joseph@josephholsten.com> wrote: > Yes, it=E2=80=99s no longer included. It=E2=80=99s long been deprecated, = but that does > make porting things like the original vi a bit challenging. > > Is there a particular project you=E2=80=99re trying to use it for? > It was never included in FreeBSD/arm64 due to the fact that the address space is complicated now and there no longer is an area beyond bss that you can expand into... let alone contract... Emacs was not happy with it... Warner --=20 > Joseph Holsten > On Nov 25, 2023 at 19:41 -0800, Bakul Shah <bakul@iitbombay.org>, wrote: > > 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 =3D 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) > > --000000000000148268060b060d72 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Sat, Nov 25, 2023, 8:44 PM <<a href=3D"mailto:j= oseph@josephholsten.com">joseph@josephholsten.com</a>> wrote:<br></div><= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> <div> <div name=3D"messageBodySection"> <div dir=3D"auto">Yes, it=E2=80=99s no longer included. It=E2=80=99s long b= een deprecated, but that does make porting things like the original vi a bi= t challenging.<br> <br> Is there a particular project you=E2=80=99re trying to use it for?</div></d= iv></div></blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"a= uto">It was never included in FreeBSD/arm64 due to the fact that the addres= s space is complicated now and there no longer is an area beyond bss that y= ou can expand into... let alone contract...</div><div dir=3D"auto"><br></di= v><div dir=3D"auto">Emacs was not happy with it...</div><div dir=3D"auto"><= br></div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><div dir= =3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><d= iv name=3D"messageSignatureSection"> -- <div dir=3D"auto">Joseph Holsten</div> </div> <div name=3D"messageReplySection">On Nov 25, 2023 at 19:41 -0800, Bakul Sha= h <<a href=3D"mailto:bakul@iitbombay.org" target=3D"_blank" rel=3D"noref= errer">bakul@iitbombay.org</a>>, wrote:<br> <blockquote type=3D"cite" style=3D"border-left-color:grey;border-left-width= :thin;border-left-style:solid;margin:5px 5px;padding-left:10px">Does sbrk n= ot exist on FreeBSD-14 on arm64? Is this by design? <div><br></div> <div><font face=3D"Menlo">$=C2=A0</font>cat sb.c</div> <div>#include <unistd.h></div> <div>#include <stdio.h></div> <div>int main(int c, char**v) {</div> <div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 void *x =3D sbrk(102400);</div> <div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("%p\n", x);</div> <div>}</div> <div>$ cc sb.c</div> <div>ld: error: undefined symbol: sbrk</div> <div>>>> referenced by sb.c</div> <div>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /tmp/sb-= e97caf.o:(main)</div> <div>cc: error: linker command failed with exit code 1 (use -v to see invoc= ation)</div> <div><br></div> </blockquote> </div> </div> </blockquote></div></div></div> --000000000000148268060b060d72--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqcA-kLd3gLWkcD1%2BPGFg48TPAF=OPk9HzRFyaokZbvAQ>