public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Questions regarding ld
@ 2020-03-18 17:55 Dan Ciliske
  2020-03-18 18:19 ` Jozef Lawrynowicz
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Ciliske @ 2020-03-18 17:55 UTC (permalink / raw)
  To: binutils

I do a lot of work at the bottom of embedded systems and I keep running 
into the same roadblocks that I'm finally asking about. Since space is 
often tight in these systems, I was wondering if there are any known 
approaches that I'm missing to solving some common problems.

My questions are:

1. Is it possible to automatically spill across sections if the 
underlying region fills? If not, is there some way after the fact move 
part of a Section to another Section that is located in a different Region?
2. With ARM Cortex-M, is there a way to split the ex_tab and exidx 
tables into two parts such that they are accessible within the 31 bit 
limit imposed by ARM_PREL31? I am well aware of the complex implications 
of this question, and realize that this is also partly a question for 
the GCC lists.


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

* Re: Questions regarding ld
  2020-03-18 17:55 Questions regarding ld Dan Ciliske
@ 2020-03-18 18:19 ` Jozef Lawrynowicz
  2020-03-18 18:45   ` Dan Ciliske
  0 siblings, 1 reply; 4+ messages in thread
From: Jozef Lawrynowicz @ 2020-03-18 18:19 UTC (permalink / raw)
  To: Dan Ciliske; +Cc: binutils

Hi,

On Wed, 18 Mar 2020 10:55:38 -0700
Dan Ciliske <dciliske@netburner.com> wrote:

> I do a lot of work at the bottom of embedded systems and I keep running 
> into the same roadblocks that I'm finally asking about. Since space is 
> often tight in these systems, I was wondering if there are any known 
> approaches that I'm missing to solving some common problems.
> 
> My questions are:
> 
> 1. Is it possible to automatically spill across sections if the 
> underlying region fills? If not, is there some way after the fact move 
> part of a Section to another Section that is located in a different Region?

Assuming that you are talking about moving input sections between output
sections (and not splitting up input sections into parts), then the recently
added "non-contiguous memory region" functionality sounds like it handles this
problem for you. See the documentation on the "--enable-non-contiguous-regions"
configure option in ld/ld.texi.

If you are not only concerned with ARM, the MSP430 linker has had functionality
to shuffle input sections named ".either.*" between upper and lower memory
regions for a while. The --{code,data}-region=either LD option also transforms
section names which don't have the ".either" prefix (e.g. from libraries) to try
to get the program to fit in the available space.

Jozef

> 2. With ARM Cortex-M, is there a way to split the ex_tab and exidx 
> tables into two parts such that they are accessible within the 31 bit 
> limit imposed by ARM_PREL31? I am well aware of the complex implications 
> of this question, and realize that this is also partly a question for 
> the GCC lists.
> 


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

* Re: Questions regarding ld
  2020-03-18 18:19 ` Jozef Lawrynowicz
@ 2020-03-18 18:45   ` Dan Ciliske
  2020-03-18 21:33     ` Christophe Lyon
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Ciliske @ 2020-03-18 18:45 UTC (permalink / raw)
  To: binutils

We are at this moment focused on ARM only. That said, I think this is 
the first time in history I've gone looking for a piece of functionality 
and it was _just_ added.

I guess it's time to work with the build team to look into being on the 
bleeding edge...

Thanks,
- Dan

On 3/18/2020 11:19 AM, Jozef Lawrynowicz wrote:
> Hi,
>
> On Wed, 18 Mar 2020 10:55:38 -0700
> Dan Ciliske <dciliske@netburner.com> wrote:
>
>> I do a lot of work at the bottom of embedded systems and I keep running
>> into the same roadblocks that I'm finally asking about. Since space is
>> often tight in these systems, I was wondering if there are any known
>> approaches that I'm missing to solving some common problems.
>>
>> My questions are:
>>
>> 1. Is it possible to automatically spill across sections if the
>> underlying region fills? If not, is there some way after the fact move
>> part of a Section to another Section that is located in a different Region?
> Assuming that you are talking about moving input sections between output
> sections (and not splitting up input sections into parts), then the recently
> added "non-contiguous memory region" functionality sounds like it handles this
> problem for you. See the documentation on the "--enable-non-contiguous-regions"
> configure option in ld/ld.texi.
>
> If you are not only concerned with ARM, the MSP430 linker has had functionality
> to shuffle input sections named ".either.*" between upper and lower memory
> regions for a while. The --{code,data}-region=either LD option also transforms
> section names which don't have the ".either" prefix (e.g. from libraries) to try
> to get the program to fit in the available space.
>
> Jozef
>
>> 2. With ARM Cortex-M, is there a way to split the ex_tab and exidx
>> tables into two parts such that they are accessible within the 31 bit
>> limit imposed by ARM_PREL31? I am well aware of the complex implications
>> of this question, and realize that this is also partly a question for
>> the GCC lists.
>>
-- 
Dan Ciliske
Principal Architect
NetBurner, Inc.
858-558-0293 x216


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

* Re: Questions regarding ld
  2020-03-18 18:45   ` Dan Ciliske
@ 2020-03-18 21:33     ` Christophe Lyon
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe Lyon @ 2020-03-18 21:33 UTC (permalink / raw)
  To: Dan Ciliske; +Cc: binutils

On Wed, 18 Mar 2020 at 19:45, Dan Ciliske <dciliske@netburner.com> wrote:
>
> We are at this moment focused on ARM only. That said, I think this is
> the first time in history I've gone looking for a piece of functionality
> and it was _just_ added.
>

"_just_" as in "I committed it last Friday" :-) (with minor changes today)

There were several threads about this, a good starting point for some
context is probably:
https://sourceware.org/legacy-ml/binutils/2019-11/msg00402.html
(it has a pointer to earlier discussions)

Thanks

Christophe


> I guess it's time to work with the build team to look into being on the
> bleeding edge...
>
> Thanks,
> - Dan
>
> On 3/18/2020 11:19 AM, Jozef Lawrynowicz wrote:
> > Hi,
> >
> > On Wed, 18 Mar 2020 10:55:38 -0700
> > Dan Ciliske <dciliske@netburner.com> wrote:
> >
> >> I do a lot of work at the bottom of embedded systems and I keep running
> >> into the same roadblocks that I'm finally asking about. Since space is
> >> often tight in these systems, I was wondering if there are any known
> >> approaches that I'm missing to solving some common problems.
> >>
> >> My questions are:
> >>
> >> 1. Is it possible to automatically spill across sections if the
> >> underlying region fills? If not, is there some way after the fact move
> >> part of a Section to another Section that is located in a different Region?
> > Assuming that you are talking about moving input sections between output
> > sections (and not splitting up input sections into parts), then the recently
> > added "non-contiguous memory region" functionality sounds like it handles this
> > problem for you. See the documentation on the "--enable-non-contiguous-regions"
> > configure option in ld/ld.texi.
> >
> > If you are not only concerned with ARM, the MSP430 linker has had functionality
> > to shuffle input sections named ".either.*" between upper and lower memory
> > regions for a while. The --{code,data}-region=either LD option also transforms
> > section names which don't have the ".either" prefix (e.g. from libraries) to try
> > to get the program to fit in the available space.
> >
> > Jozef
> >
> >> 2. With ARM Cortex-M, is there a way to split the ex_tab and exidx
> >> tables into two parts such that they are accessible within the 31 bit
> >> limit imposed by ARM_PREL31? I am well aware of the complex implications
> >> of this question, and realize that this is also partly a question for
> >> the GCC lists.
> >>
> --
> Dan Ciliske
> Principal Architect
> NetBurner, Inc.
> 858-558-0293 x216
>

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

end of thread, other threads:[~2020-03-18 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 17:55 Questions regarding ld Dan Ciliske
2020-03-18 18:19 ` Jozef Lawrynowicz
2020-03-18 18:45   ` Dan Ciliske
2020-03-18 21:33     ` Christophe Lyon

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