search for: dt_init_array

Displaying 4 results from an estimated 4 matches for "dt_init_array".

2014 Dec 08
3
[LLVMdev] [lld] Handling multiple -init/-fini command line options
...kar Easwaran <shankare at codeaurora.org> wrote: > On 12/8/2014 11:09 AM, Joerg Sonnenberger wrote: >> >> On Mon, Dec 08, 2014 at 10:21:49AM -0600, Shankar Easwaran wrote: >>> >>> The DT_INIT/DT_FINI correspond to one initializer function,where as >>> DT_INIT_ARRAY/DT_FINI_ARRAY is used when there is more than one >>> initalizer function/finalizer function respectively. >> >> This is not true. The difference is that the DT_INIT / DT_FINI function >> is responsible for calling into the .init / .fini block and for >> DT_INIT_ARR...
2014 Dec 08
3
[LLVMdev] [lld] Handling multiple -init/-fini command line options
On Mon, Dec 08, 2014 at 10:21:49AM -0600, Shankar Easwaran wrote: > The DT_INIT/DT_FINI correspond to one initializer function,where as > DT_INIT_ARRAY/DT_FINI_ARRAY is used when there is more than one > initalizer function/finalizer function respectively. This is not true. The difference is that the DT_INIT / DT_FINI function is responsible for calling into the .init / .fini block and for DT_INIT_ARRAY / DT_FINI_ARRAY, the block is explicitly...
2014 Dec 08
3
[LLVMdev] [lld] Handling multiple -init/-fini command line options
...gure DT_INIT/DT_FINI tags. This behaviour exactly corresponds to the GNU linker. By the way symbols specified in the -init/-fini options can be in any sections, not only .init/.fini. 2. -init-array/-fini-array options (I still not sure we need this functionality) affect .init_array/.fini_array and DT_INIT_ARRAY/DT_FINI_ARRAY tags. The order of these options define priority. The only problem is that we cannot setup priority of DT_INIT vs DT_INIT_ARRAY. -- Simon Atanasyan
2014 Dec 08
5
[LLVMdev] [lld] Handling multiple -init/-fini command line options
Hi, The LLD linker in gnu flavor mode accepts multiple -init/-fini command line options. For _all_ symbols specified by these options the linker creates appropriate entries in the .init_array/.fini_array sections. But it looks like LD and Gold linkers do not support this feature and take in account only the last -init/-fini options. % cat foo.c int a = 0; void foo() { a += 1; } void bar() { a +=