From owner-freebsd-arm@freebsd.org Sun May 31 16:15:49 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6520338912 for ; Sun, 31 May 2020 16:15:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from 44-233-67-66-mail.ore.mailhop.org (44-233-67-66-mail.ore.mailhop.org [44.233.67.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49Zk1d2QZRz4LMB for ; Sun, 31 May 2020 16:15:49 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1590941741; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=L6R022icPxyub6x3fzzs6VPc7SBPrBDQWuqJt6rN2UwnGYlL1/2JN872mj6NZXhebTT/sUEkAJDlq oqopjNpy0o+p4biMkN/VHk/4B03LuIvKDN0xE6AJww8fMD419HxhpvQQze90O1kjL90nFy8K9GrAG1 XKRBBp9k52yYWS5o78YUTf3wDNjYtpWjIW/Pk6CVEB548ySH6XIbTlFUm/5Qe7H7ss/QaMX03i4dqH bcB0MFPZfygMjSApK6JRo3GZfY+6SM8WFZGNKzrLwaH17ksVpwxcirsUo8jSrllyl4RPJKjTVn8GqE FzG4S0XpkRMvrxlidEob6o2+rEuPU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=vCQykd97ZHfLPGjVLxegk/JegcbXEj4zfedDni/FCbo=; b=hUJxLPNsy6rdAsXGmCvdK6ZS7l1FwJzk3c6r5m7gwR1orSHLLzg3K0rNb9OI9iGvkpWzG2f6DzP+C f59EXx9HdkVf0kyeTZMKkO3Ib+GjgqwIQxzcuA2jHvPIGbfBlAVRDUSFLKgMUiglBjJ964Vu4N/Q5C MvM/DtLWgda+P1vSvbx/qaPmGjy3kFkq22OZM1xV1C7fYUsPeVC7ghd5OIfUQ17sW/TUAEwc9hyh1V hEs9wgHRSu2u6lqEj6ujIZHC7IRr0OqsO6o31OQXHExABRmslbH/sfGZjclypHW3PR0nbIHFwl+ozy AQbRV6EsI5pikmeLQ2s5skzKmYsOPVQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=vCQykd97ZHfLPGjVLxegk/JegcbXEj4zfedDni/FCbo=; b=KgifdfZ2FiVBZGIvN4CrWhu6IoVfLsioCbFra073x4q7IegFScm8KaH0ZDbQ7m9lyVK5FAMoSRWsP qQIco97mDEL+2nj56SP1EsBwn1yIMbpUeT7zumI5T0qTmTL5ntbJnsUYkoD0wz1Wv+l+/t/g3n82gc hNhQfpDWKOyJzW9Cc6VL9vfmBcQ02Zre0HZV2++zZ9jmGJXTAxA96tkfyT/R3ixcLqJQOLpOnizlaS pXpb3mTjadnPW4kAfMQDTDvY8MaGN+tGjyuCyR0ltaxqrf8l39AMZzOJQdlrTmI87OMcS8b6rCzjKi W6QHbbZwqKSbGacPUTkL3/aW7cP5ZnQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: f6e8c87b-a359-11ea-b10c-b5956a7dd1a1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id f6e8c87b-a359-11ea-b10c-b5956a7dd1a1; Sun, 31 May 2020 16:15:40 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 04VGFb3V056953; Sun, 31 May 2020 10:15:37 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <7e3d0d24188a05415252429bf9d7a9bb93040ea0.camel@freebsd.org> Subject: Re: code generation From: Ian Lepore To: mlist@nlned.nl, freebsd-arm@freebsd.org Date: Sun, 31 May 2020 10:15:37 -0600 In-Reply-To: <7aed18ab40ff22810b64bbb77b481c78.squirrel@www.nlned.nl> References: <7aed18ab40ff22810b64bbb77b481c78.squirrel@www.nlned.nl> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49Zk1d2QZRz4LMB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2020 16:15:49 -0000 On Sat, 2020-05-30 at 23:52 +0200, Jack Raats wrote: > Hi, > > Can anyone explain why a simple hello_world.c compiles on a AMD64 > machine > to +/- 21000 bytes while on a raspberry pi 3 +/- 206000 bytes (10 > times > more) > > I use FreeBSD 12.1 stable on RPi3 and cc -o hello hello.c to compile. > > Gr., > Jack > > I recall some discussion recently about sections of executable files in arm binaries now being aligned to a much larger page size than the old 4K alignment. When you have a mix of readonly and readwrite data, they have to go into separate sections/pages so that proper read/write permission bits can be set on the pages containing the data. So all in all, this is probably lots and lots of zero-padding in the files that didn't used to be there. It's onerous only in that it makes a large collection of small programs (e.g., /usr/bin) take a lot more disk space. -- Ian