From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Given Subject: Re: binary size changes from 0.1.0 Date: Thu, 10 Jun 2004 10:52:50 +0100 Sender: linux-8086-owner@vger.kernel.org Message-ID: <200406101052.50052.dg@cowlark.com> References: <20040610073556.GJ28709@vega.vega.lgb.hu> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20040610073556.GJ28709@vega.vega.lgb.hu> Content-Disposition: inline List-Id: Content-Type: text/plain; charset="iso-8859-1" To: linux-8086@vger.kernel.org On Thursday 10 June 2004 08:35, G=E1bor L=E9n=E1rt wrote: > Also if you check some simple utils, like chmod and others, you will = see > that significant amount of size is error description, I mean textual > representation of errno codes, as you can get by calling perror() or > via sys_errlist array. The only problem that almost EACH utility has > to contain these messages. So, the best soultion would be shared libr= ary > of course but it's hard to implement at once. In my experimental OS > this was handled in quite "ugly" way: include messages into the kerne= l, > and let a syscall query the error message. This is very ugly, but it'= s > simple, and avoids each binary contain all of the messages, so it wil= l > result in less memory usage, and of course smaller disk image ... One common trick is to not keep the list of error messages in memory at= all,=20 but to keep them in a file on disk. When perror() is called, the file i= s=20 opened, read until the right error message is found, and that one used.= =2E. of=20 course, this approach means that you can't do sys_errlist, but it's per= fectly=20 adequate for perror. You may also want to check to see if the optimisation settings have cha= nged. --=20 +- David Given --McQ-+ "Est brilgum: toui slimici | dg@cowlark.com | In uabo tererotitant | (dg@tao-group.com) | Brogoui sunt macresculi +- www.cowlark.com --+ Momi rasti strugitant." --- Anonymous - To unsubscribe from this list: send the line "unsubscribe linux-8086" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html