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

Christophe Lyon christophe.lyon@linaro.org
Mon Feb 3 10:08:00 GMT 2020
Hi,

This is a follow-up to
https://sourceware.org/ml/binutils/2019-11/msg00402.html
and
https://sourceware.org/ml/binutils/2020-01/msg00064.html

The changes between v2 and v3:
* added some doc/NEWS
* fixed bugs detected when running the testsuite with the option
activated by default. In particular, I've noticed and documented the
incompatibility with INSERT (or rather, it's likely to cause problems,
but depends on the actual linker scripts contents), because my new
option breaks the assumption of the parsing & processing order assumed
by INSERT.
* added new option --enable-non-contiguous-regions-warnings which
activates some warnings to help understand why the behaviour changes
in some cases

We'd still have to do modify target that has XXX_build_one_stub(), in
a way similar to what I did in elf32-arm.c.

What is the recommended way of early-exiting the linker when a problem
is detected? I'm using abort(), but that's not very nice and implies
that there's a bug in the linker code. I'm more willing to report
unsupported cases in a friendly way.

There are 4 patches, to hopefully make review/comments easier; I can
squash them at commit time if this is preferable.
* patch1: is the main (code) patch
* patch2: generic test
* patch3: arm tests
* patch4: powerpc test

Thoughts?

Thanks,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-non-contiguous-memory-regions.patch
Type: text/x-patch
Size: 18395 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200203/0a74d72e/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/20200203/0a74d72e/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/20200203/0a74d72e/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: 23045 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200203/0a74d72e/attachment-0003.bin>


More information about the Binutils mailing list