From nobody Sun Nov 26 03:47:45 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SdF6l1Ypsz52Zs8 for ; Sun, 26 Nov 2023 03:47:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SdF6k749Kz4f76 for ; Sun, 26 Nov 2023 03:47:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5488bf9e193so4263769a12.2 for ; Sat, 25 Nov 2023 19:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1700970477; x=1701575277; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MaJJkmB7jVfHQje04aqOyvqqJQxZKVNgzf8vrBcWHrc=; b=JahwTkr7bt8Ulw10lCuHrOGZbxirnYDdmmWzmFV+5bw5tJPGaBm13vwfNkxuuAiUkK tH9P+3VxEBwNlJewvyFZ7wf8JkI/MPhpSyR1w/S7AX4XyCg/2k7nAvz1yyPS9n2RSsgU hug1sAemEpey++yDRuhGzA+4LXeVexDB6M90HD5B4c5YieF9wLRM9FgiRm0/hICCLx2q 4R8+BY4djU2nrz2Pwondh6agP7Rzy6wOmEcqGsKRjMzBRlhcXAcBz7ol2MGR3623/uGq jdRdo8qgO4RyqF8xiVqxvs0+lMFEPiMOmgAQdxCF+FPFWu74L7xrXjVjsTkPeLThgIrj meOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700970477; x=1701575277; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MaJJkmB7jVfHQje04aqOyvqqJQxZKVNgzf8vrBcWHrc=; b=YmG82h0FMxDAN/pWjk2XmySVwyQWxjZ9v0wrKFCIvvVN5XfuLAG8gyJMCKXcna2kBx DFY3/dVh6grHgQmqs2AJ3NyDIznlcWN9NO2/S59nLmPj0ldC5adbiQVjk5phk/KAFi0y xj79Ex2+PhDNuTU/NItEVFsKPVoCl9WmzpHCdYI5QfyOjBBij+Nm6Xe/mS+gQX72nf0Q U3kUuBTB87vTa1y2eXzCbPFeWOKnQw3/Oxh876ZKHjuhej6U8QjTWdOxKPTuhkx2gr+N OsEpY+R0wMWd80rKpTUCmQw8gnuVUv2pXWONV1cHFrXD/XYRpc32yf5QczeQ4xgdK2IA T14w== X-Gm-Message-State: AOJu0YzkHfK5KY9rEIDcgwHS9yn6saOEKyrE1dBo1YI+fGNvmlZ3UGdc YLsUO/4m3lQEDKXLUoTHFVAYKLsI3KOhVihh5KDXDQ== X-Google-Smtp-Source: AGHT+IFMQQXUTJ3qwEFZltzqufo3g6v/X4eLm5D09B0m3PDOHdYd6Fx05y4OC/vC0R+Mzl5b62VFRKRXeH9oCMmH8Yg= X-Received: by 2002:aa7:d34e:0:b0:540:2c48:7913 with SMTP id m14-20020aa7d34e000000b005402c487913mr5608541edr.38.1700970477416; Sat, 25 Nov 2023 19:47:57 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <2F758BA2-F7F5-4A2C-85CF-6969EE50309C@iitbombay.org> <949f8f16-1219-4f4a-abf6-f9727c95681b@Spark> In-Reply-To: <949f8f16-1219-4f4a-abf6-f9727c95681b@Spark> From: Warner Losh Date: Sat, 25 Nov 2023 20:47:45 -0700 Message-ID: Subject: Re: sbrk To: Joseph Holsten Cc: "freebsd-arm@freebsd.org" , Bakul Shah Content-Type: multipart/alternative; boundary="000000000000148268060b060d72" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SdF6k749Kz4f76 --000000000000148268060b060d72 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 25, 2023, 8:44 PM 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 , wrote: > > Does sbrk not exist on FreeBSD-14 on arm64? Is this by design? > > $ cat sb.c > #include > #include > 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


On Sat, Nov 25, 2023, 8:44 PM <joseph@josephholsten.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
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.

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 addres= s space is complicated now and there no longer is an area beyond bss that y= ou can expand into... let alone contract...

Emacs was not happy with it...
<= br>
Warner

--
Joseph Holsten
On Nov 25, 2023 at 19:41 -0800, Bakul Sha= h <bakul@iitbombay.org>, wrote:
Does sbrk n= ot exist on FreeBSD-14 on arm64? Is this by design?

$=C2=A0cat sb.c
#include <unistd.h>
#include <stdio.h>
int main(int c, char**v) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 void *x =3D sbrk(102400);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("%p\n", x);
}
$ cc sb.c
ld: error: undefined symbol: sbrk
>>> referenced by sb.c
>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /tmp/sb-= e97caf.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invoc= ation)

--000000000000148268060b060d72--