On 2018-11-28 4:07 p.m., Helge Deller wrote:
This is what I see now. Why aren't the last .text sections (#2-6 a
least) merged? Are there any linker options I can try?

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
...
   2 .text         000004a4  00001000  00001000  00001000  2**12
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
   3 .text         0000984c  00000000  00000000  000014a4  2**2
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
   4 .text         00005cdc  00000000  00000000  0000acf0  2**2
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
   5 .text         00003e20  00000000  00000000  000109cc  2**2
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
   6 .text         00000b88  00000000  00000000  000147ec  2**2
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
   7 .text         00000000  00000000  00000000  00015374  2**0
                   CONTENTS, ALLOC, LOAD, READONLY, CODE

But maybe we should revert to -ffunction-sections for modules anyway.
If all .text sections get merged it may happen that we get too big
modules again which fail to load because the distance for jumps are too
far. Currently the module loader will insert jump tables between
sections if necessary...
If I remember correctly, section merging is controlled by linker script.

It does seem unique section names are required for modules, so I think reverting to
-ffunction-sections for modules is a good idea for the moment.

In looking at some arm64 modules, I only see one .text section.

Dave

--
John David Anglin  dave.ang...@bell.net

Reply via email to