From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 22 Jun 2005 17:54:36 -0400 From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] 8l vs. acid? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 5f5bd1e0-ead0-11e9-9d60-3106f5b1d025 There are fixes on sources for this. It's caused by there not really being any difference in the a.out layout between the bootable kernel image and a plain executable. I'd not noticed that before, but to tell the truth I can't remember ever wanting to look at the data part of a boot image file (as opposed to the data part of a loaded boot image). Thanks. --jim On Wed Jun 22 16:25:54 EDT 2005, newsham@lava.net wrote: > Hi, > I'm seeing some strange behavior in the linking and debugging > of a small program of mine: > http://lava.net/~newsham/quest/ > > When I build it and inspect it in acid, it shows the map as: > {{"text", 0x80100020, 0x80100041, 0x00000020}, > {"data", 0x80100041, 0x80100049, 0x00000041}} > > and indeed I see the data starting at 0x80100041. However > the relocation values in the binary and the symbol table > both think that the "hello" variable starts at 0x80101000. > > Now if I change the -T0x80100020 to -T0x100020 the map is > even stranger: > {{"text", 0x00001020, 0x00001041, 0x00000020}, > {"data", 0x00002000, 0x00002008, 0x00000041}} > > however, the symbols say that the _main and hello are at > 0x100020 and 0x101000 respectively. > > What gives? Who's to blame here, libmach? > > Tim Newsham > http://www.lava.net/~newsham/