From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 3/3] mini-os: sort objects in binary archives Date: Mon, 16 Feb 2015 12:59:13 +0100 Message-ID: <20150216115913.GA12596@aepfle.de> References: <1422963937-16033-1-git-send-email-olaf@aepfle.de> <1422963937-16033-4-git-send-email-olaf@aepfle.de> <1423139069.24924.99.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1423139069.24924.99.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Samuel Thibault , Stefano Stabellini , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Feb 05, Ian Campbell wrote: > On Tue, 2015-02-03 at 12:45 +0100, Olaf Hering wrote: > > When building stubdom the mini-os objects are also linked into the > > binary. Unfortunately the linker will place them in the order found in > > the archive. Since this order is random the resulting stubdom binary > > differs when it was built from identical sources but on different > > build hosts. To help with creating a reproducible binary the elements > > in an archive must simply be sorted before passing them to $(AR). > > OOI why does this problem not also apply the to the regular .a and .so > files we build? Either because they are built from a fixed list of input files, or the linker places the individual object files in a fixed order into shared objects. Olaf