delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/06/03/13:38:09

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Building libc.a
To: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Date: Wed, 3 Jun 92 10:10:51 PDT
Mailer: Elm [revision: 66.25]
Status: O

The other day I wanted to add a .o file to libc.a.  I remembered that
the README file says that a sequenced archive file can't be added to,
so I decided to rebuild libc.a from scratch.

I was able to compile all the source files into .o files, and create a
new libc.a from them.  However, the new libc.a is not identical to the
original one.  The new one is also larger than the original by several
hundred bytes.  I was expecting them to be identical, so I'm now
wondering if I did something wrong.

I did an nm on the old and new libc.a files, and found that all of the
symbols were the same (and in the same order), but some of them were
at slightly different locations.

I used the same "-O" command-line option as the makefile for libc
specified.  I conclude that one of three things happenned:

	1. DJ made the distributed libc.a from an earlier version of
	   gcc that doesn't produce exactly the same code.

	2. DJ used different command-line options than the makefile
	   indicates.

	3. I messed up somewhere.

Anyone have any clues?  Has anyone else rebuilt libc.a and ended up
with something identical to the distributed libc.a?
--
				Eric Backus
				ericb%hplsla AT hplabs DOT hp DOT com
				(206) 335-2495

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019