Date: Sun, 31 May 2020 10:15:37 -0600 From: Ian Lepore <ian@freebsd.org> To: mlist@nlned.nl, freebsd-arm@freebsd.org Subject: Re: code generation Message-ID: <7e3d0d24188a05415252429bf9d7a9bb93040ea0.camel@freebsd.org> In-Reply-To: <7aed18ab40ff22810b64bbb77b481c78.squirrel@www.nlned.nl> References: <7aed18ab40ff22810b64bbb77b481c78.squirrel@www.nlned.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e3d0d24188a05415252429bf9d7a9bb93040ea0.camel>