* [9fans] 8l vs. acid?
@ 2005-06-22 20:24 Tim Newsham
2005-06-22 20:44 ` Tim Newsham
2005-06-22 21:54 ` jmk
0 siblings, 2 replies; 3+ messages in thread
From: Tim Newsham @ 2005-06-22 20:24 UTC (permalink / raw)
To: 9fans
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] 8l vs. acid?
2005-06-22 20:24 [9fans] 8l vs. acid? Tim Newsham
@ 2005-06-22 20:44 ` Tim Newsham
2005-06-22 21:54 ` jmk
1 sibling, 0 replies; 3+ messages in thread
From: Tim Newsham @ 2005-06-22 20:44 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> I'm seeing some strange behavior in the linking and debugging
> of a small program of mine:
Some more data points:
- using -R1 while linking fixes the issue.
- I'm using the same flags as the pc kernels.
- I also see weird behavior when looking at pc kernels:
screen.c:334: int hwaccel = 1;
$ acid 9pcdisk
acid: *hwaccel
0x000a7373
Is acid (libmach?) out of sync with how the kernel is
actually loaded?
Tim Newsham
http://www.lava.net/~newsham/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] 8l vs. acid?
2005-06-22 20:24 [9fans] 8l vs. acid? Tim Newsham
2005-06-22 20:44 ` Tim Newsham
@ 2005-06-22 21:54 ` jmk
1 sibling, 0 replies; 3+ messages in thread
From: jmk @ 2005-06-22 21:54 UTC (permalink / raw)
To: 9fans
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-22 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 20:24 [9fans] 8l vs. acid? Tim Newsham
2005-06-22 20:44 ` Tim Newsham
2005-06-22 21:54 ` jmk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).