public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Adrian Muresan <adrianmuresan@outlook.com>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: GNU linker script - how to automatically distribute code to multiple non-contiguous sections
Date: Tue, 30 Oct 2018 20:28:00 -0000	[thread overview]
Message-ID: <DM5PR11MB00571BF88BFE52DAB5684C69BECC0@DM5PR11MB0057.namprd11.prod.outlook.com> (raw)

I'm modifying an existing .ld and I have two flash sections for the code. These two flash sections are not contiguous so I cannot merely extend the definition of one of the sections to include the other.

Currently all of the code can fit in sec1 but if I turn off space optimizations, it doesn't fit.

QUESTION

How do I write the .ld to say:  place as much of the code as will fit in sec1 and then as much as will fit in sec2 and then ... sec3... etc?

I know how to place specific .obj in specific section but that's not what I want because I'll need to constantly modify the .ld as my code changes.

             reply	other threads:[~2018-10-30 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 20:28 Adrian Muresan [this message]
2018-11-02 11:01 ` Florian Weimer

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=DM5PR11MB00571BF88BFE52DAB5684C69BECC0@DM5PR11MB0057.namprd11.prod.outlook.com \
    --to=adrianmuresan@outlook.com \
    --cc=gcc-help@gcc.gnu.org \
    /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).