9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] compiler -- help?
@ 2004-12-14  7:40 Tim Newsham
  2004-12-14  7:46 ` Tim Newsham
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Newsham @ 2004-12-14  7:40 UTC (permalink / raw)
  To: 9fans

Hi, I'm having some trouble with the compiler (the linker really).
I don't really have a very strong knowledge of its internals yet.
I'm trying to take the sparc linker and force it to link TEXT at
0x2000 instead of the normal 0x1000.  The modifications involved
a quick change to kl/obj.c to set INITTEXT, INITDAT and INITRND
to 0x2020, 0 and 0x2000 respectively (which should be equivalent
to just providing cmd line flags -H2 -T8224 -R8192).  I also
changed libmach to set the pgsize to 8192 so that loading up
images in acid should agree with these settings.  However, I am
now seeing some inconsistencies in the resulting output:

  - When I load up the binary, the code that should be at 0x2020
    is indeed at that address.
  - The symbol for the start of the binary refers to 0x1020.
  - Data refered to through the static base appear to refer to
    the same address as the symbol, which is 0x1000 smaller than
    where the data is loaded.

I'm going to be digging through this linker to track this down, but
if anyone has some hints, they'd be greatly appreciated.

Tim N.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] compiler -- help?
  2004-12-14  7:40 [9fans] compiler -- help? Tim Newsham
@ 2004-12-14  7:46 ` Tim Newsham
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Newsham @ 2004-12-14  7:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Ugh..  wouldnt you know as soon as I send this off I notice
something really stupid.  Please ignore the last question.
(I had some flags in the mkfile I forgot about).

Tim N.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-14  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-14  7:40 [9fans] compiler -- help? Tim Newsham
2004-12-14  7:46 ` Tim Newsham

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).