Lines Matching +full:partition +full:-
11 partitioned program consists of a main partition together with a number of
12 loadable partitions. The loadable partitions depend on the main partition
14 shared object, the main partition and the loadable partitions share a virtual
15 address space at link time, and each loadable partition is assigned a fixed
16 offset from the main partition. This allows the loadable partitions to refer
17 to code and data in the main partition directly without the binary size and
21 -----
24 going to be used as the "entry points" for each partition. An entry point
25 could, for example, be the equivalent of the partition's ``main`` function, or
27 by the partition. The intent is that in order to use a loadable partition,
29 load the partition at its assigned address, look up an entry point by name
37 ``-fsymbol-partition=<soname>``, where ``<soname>`` is the intended soname
38 of the partition. The resulting object files are passed to the linker in
43 which entry points, similarly to how ``--gc-sections`` removes unused parts of
44 a program. Any sections that are only reachable from a loadable partition's
45 entry point are assigned to that partition, while all other sections are
46 assigned to the main partition, including sections only reachable from
50 section is colored according to its assigned partition.
56 referred to as a combined output file. To extract a partition from the
57 combined output file, the ``llvm-objcopy`` tool should be used together
58 with the flag ``--extract-main-partition`` to extract the main partition, or
59 ``-extract-partition=<soname>`` to extract one of the loadable partitions.
62 .. code-block:: shell
65 clang -ffunction-sections -fdata-sections -c main.c
67 # Compile a feature to be placed in a loadable partition.
68 # Note that this is likely to be a separate build step to the main partition.
69 clang -ffunction-sections -fdata-sections -fsymbol-partition=libfeature.so -c feature.c
72 …clang main.o feature.o -fuse-ld=lld -shared -o libcombined.so -Wl,-soname,libmain.so -Wl,--gc-sect…
75 llvm-objcopy libcombined.so libmain.so --extract-main-partition
76 llvm-objcopy libcombined.so libfeature.so --extract-partition=libfeature.so
79 and the locations of their reserved regions, the linker creates a partition
82 .. code-block:: c
90 The ``name_offset`` field is a relative pointer to a null-terminated string
91 containing the soname of the partition, the ``addr_offset`` field is a
93 size of the region reserved for the partition. To derive an absolute pointer
97 The program may discover the location of the partition index using the
98 linker-defined symbols ``__part_index_begin`` and ``__part_index_end``.
101 ------------
107 ``--section-start``, ``-Ttext``, ``-Tdata`` or ``-Tbss`` flags. All of these
109 makes their semantics ambiguous in the presence of more than one partition.
112 because it is unclear whether the MIPS multi-GOT ABI is compatible with