Displaying 5 results from an estimated 5 matches for "__init_start".
2017 Jun 06
4
LLD support for ld64 mach-o linker synthesised symbols
...andq $-16,%rsp
movq __image_base(%rip), %rsi
leaq start(%rip), %rdx
subq __start_static(%rip), %rdx
call __start_c
In C:
/* run C++ constructors in __libc_start_main for x86_64-xnu-musl */
typedef void (*__init_fn)(int, char **, char **, char **);
extern __init_fn __init_start __asm("section$start$__DATA$__mod_init_func");
extern __init_fn __init_end __asm("section$end$__DATA$__mod_init_func”);
static void __init_mod(int argc, char **argv, char **envp, char **applep)
{
for (__init_fn *p = &__init_start; p < &__init_end; ++p) {...
2017 Jun 06
2
LLD support for ld64 mach-o linker synthesised symbols
...%rsi
> leaq start(%rip), %rdx
> subq __start_static(%rip), %rdx
> call __start_c
>
> In C:
>
> /* run C++ constructors in __libc_start_main for x86_64-xnu-musl */
>
> typedef void (*__init_fn)(int, char **, char **, char **);
> extern __init_fn __init_start __asm("section$start$__DATA$__mod_init_func");
> extern __init_fn __init_end __asm("section$end$__DATA$__mod_init_func”);
>
> static void __init_mod(int argc, char **argv, char **envp, char **applep)
> {
> for (__init_fn *p = &__init_start; p < &am...
2015 Oct 05
7
[PATCH 0/4] Improve linker scripts
From: Sylvain Gault <sylvain.gault at gmail.com>
These patches basically remove unused linker scripts and port a change that was
made to an unused script.
Those are to be applied on top of the gcc 5 bug fixes as they would conflict
otherwise.
Sylvain Gault (4):
diag/mbr: fix dependency to linker script
Remove unused linker scripts
core: Make symbols defined in linker script HIDDEN
2017 Jun 07
3
LLD support for ld64 mach-o linker synthesised symbols
...t;> subq __start_static(%rip), %rdx
>> call __start_c
>>
>>
>> In C:
>>
>> /* run C++ constructors in __libc_start_main for x86_64-xnu-musl */
>>
>> typedef void (*__init_fn)(int, char **, char **, char **);
>> extern __init_fn __init_start __asm("section$start$__DATA$__mod_
>> init_func");
>> extern __init_fn __init_end __asm("section$end$__DATA$__
>> mod_init_func”);
>>
>> static void __init_mod(int argc, char **argv, char **envp, char **applep)
>> {
>> for (__ini...
2015 Oct 05
0
[PATCH 2/4] Remove unused linker scripts
...ack16_start = .);
- . += STACK_LEN;
- HIDDEN(__stack16_end = .);
- }
- HIDDEN(__stack16_len = ABSOLUTE(__stack16_end) - ABSOLUTE(__stack16_start));
- HIDDEN(__stack16_dwords = (__stack16_len + 3) >> 2);
-
- /* Initialized sections */
-
- . = 0x7c00;
- .init : {
- FILL(0x90909090)
- HIDDEN(__init_start = .);
- *(.init)
- HIDDEN(__init_end = .);
- }
- HIDDEN(__init_len = ABSOLUTE(__init_end) - ABSOLUTE(__init_start));
- HIDDEN(__init_dwords = (__init_len + 3) >> 2);
-
- .text16 : {
- FILL(0x90909090)
- HIDDEN(__text16_start = .);
- *(.text16)
- HIDDEN(__text16_end = .);
- }
- HIDDEN(__...