public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: shreyas76@gmail.com
Cc: binutils@sources.redhat.com
Subject: Re: Address assignment
Date: Wed, 14 Sep 2005 05:38:00 -0000	[thread overview]
Message-ID: <200509140140.j8E1eSBq032590@greed.delorie.com> (raw)
In-Reply-To: <24389fb30509131834632d3d1f@mail.gmail.com> (message from shreyas krishnan on Wed, 14 Sep 2005 01:34:42 +0000)


If what you mean is something like "I have this structure, but it exists
at a specific address" you can easily do this in the assembler like this:

	.global _my_struct
_my_struct = 0xa0001028

The linker doesn't care *what* a symbol is, just *where* it is.  The
above gives it an absolute address (it shows up in the "*ABS*"
section) but doesn't allocate any space for it (sorry, no overlap
protection).


If what you mean is "I want code in this block of flash, and data in
this block of RAM" then you want to look up the MEMORY directive for
link scripts in the linker manual ("info ld").  If you download the
latest newlib from CVS and look at libgloss/m32c you'll see a number
of examples of how to manage all that.

  reply	other threads:[~2005-09-14  1:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14  4:20 shreyas krishnan
2005-09-14  5:38 ` DJ Delorie [this message]
2005-09-14 10:47   ` shreyas krishnan
2005-09-14 13:17     ` Dave Korn
2005-09-14 16:50       ` DJ Delorie
2005-09-14 19:37         ` Dave Korn
2005-09-14 20:53           ` Paul Koning
2005-09-14 21:20             ` Dave Korn
2005-09-14 22:16         ` shreyas krishnan
2005-09-14 19:23           ` DJ Delorie
2005-09-14 23:23       ` shreyas krishnan
2005-09-14 23:43         ` DJ Delorie
2005-09-15  2:23           ` shreyas krishnan

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=200509140140.j8E1eSBq032590@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=shreyas76@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).