Questions regarding ld

Jozef Lawrynowicz jozef.l@mittosystems.com
Wed Mar 18 18:19:57 GMT 2020


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




More information about the Binutils mailing list