[PATCH RFC v2] Add support for non-contiguous memory regions

Christophe Lyon christophe.lyon@linaro.org
Fri Jan 10 10:22:00 GMT 2020


Hi,


On Wed, 8 Jan 2020 at 14:59, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>
> On Wed, 8 Jan 2020 at 14:14, Nick Clifton <nickc@redhat.com> wrote:
> >
> > Hi Christophe,
> >
> > > There are now 4 patches, to hopefully make review/comments easier:
> > > * patch1: is the main (code) patch
> > > * patch2: generic test
> > > * patch3: arm tests
> > > * patch4: powerpc test
> >
> > I think that you need to test some non-ELF based targets.  Or maybe a
> > --enable-targets=all configuration.  I am seeing this error when building:
> >
> >   bfd/ecoff.c:81:1: error: missing initializer for field 'already_assigned' of 'asection' {aka 'struct bfd_section'} [-Werror=missing-field-initializers]
>
> Right, I didn't try non-elf targets.
> If it helps your testing, I was just missing:
> diff --git a/bfd/ecoff.c b/bfd/ecoff.c
> index be3d42e..2ce2c8f 100644
> --- a/bfd/ecoff.c
> +++ b/bfd/ecoff.c
> @@ -77,7 +77,9 @@ static asection bfd_debug_section =
>    /* symbol_ptr_ptr,                                              */
>       NULL,
>    /* map_head, map_tail                                                   */
> -     { NULL }, { NULL }
> +     { NULL }, { NULL },
> +  /* already_assigned                                             */
> +     NULL,
>  };
>
>  /* Create an ECOFF object.  */
>
> >
> > Also when adding a new feature like this, it would be nice if you could
> > include a line or two in ld/NEWS describing what it does.  This makes it
> > easier for me to advertise the feature when announcing a new release...
> >
> > Also you should add a description of the option to ld/ld.texi.
>
> Sure, I am aware of that. At this stage, I'm still looking for comments
> on the design. I fear I'm doing changes in a very wrong way.
> OTOH, if this approach looks fine to you, I'll make sure to submit a patch
> including some docs before the 2.34 deadline :-)
>

Here is an updated version:
* fixes non-elf build
* adds entries in NEWS and ld.texi

I'm wondering whether I should do something cleaner than abort() when
detecting an unsupported case?

Also, I'm still not sure about the new option name....

Since it changes the processing to allow several output sections to
match, maybe --enable-non-contiguous-regions is not good although it
describes the original need.
Would --multiple-output-sections be better? (actually, there's still
only one output in the end....)

Thanks,

Christophe

> Thanks,
>
> Christophe
>
> >
> > Cheers
> >   Nick
> >
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-non-contiguous-memory-regions.patch
Type: text/x-patch
Size: 14527 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200110/65315af2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-generic-test-for-non-contiguous-memory-regions.patch
Type: text/x-patch
Size: 4238 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200110/65315af2/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-powerpc-test-for-non-contiguous-memory-regions.patch
Type: text/x-patch
Size: 3115 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200110/65315af2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-arm-tests-for-non-contiguous-memory-regions.patch
Type: text/x-patch
Size: 23037 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200110/65315af2/attachment-0003.bin>


More information about the Binutils mailing list