9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Tim Newsham <newsham@lava.net>
To: 9fans@cse.psu.edu
Subject: [9fans] linker bug
Date: Thu, 25 Nov 2004 08:46:12 -1000	[thread overview]
Message-ID: <Pine.BSI.4.58.0411250842340.6130@malasada.lava.net> (raw)

There appears to be a bug in the linker (at least in kl) when
using the -R flag.  When I specify a value of -R0x4 everything
seems to work fine.  If I specify larger values such as -R0x10,
then occasionally (depending on the size of the text region,
I presume) the emitted binary is incorrect.  For example, if
I have an initialized variable:

    static int x = 0x12345678;

then the address of x (in the symbol table and as referenced
by the instructions) will not line up with the initialized word
that contains the value 0x12345678.

I've stopped using the flag in this way (turns out I didnt need
it after all), so I haven't tracked down the bug any further,
but thought I'd mention it before it bites someone else.

Tim N.


             reply	other threads:[~2004-11-25 18:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 18:46 Tim Newsham [this message]
2004-11-26 12:37 ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSI.4.58.0411250842340.6130@malasada.lava.net \
    --to=newsham@lava.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).