140 lines
3.4 KiB
D
140 lines
3.4 KiB
D
/**
|
|
* This module provides access to linker-defined symbols.
|
|
*/
|
|
module hulk.linker_addresses;
|
|
|
|
private extern extern(C) __gshared ubyte _hulk_header_start;
|
|
private extern extern(C) __gshared ubyte _hulk_header_end;
|
|
private extern extern(C) __gshared ubyte _hulk_header_size;
|
|
|
|
private extern extern(C) __gshared ubyte _hulk_text_start;
|
|
private extern extern(C) __gshared ubyte _hulk_text_end;
|
|
private extern extern(C) __gshared ubyte _hulk_text_size;
|
|
|
|
private extern extern(C) __gshared ubyte _hulk_rodata_start;
|
|
private extern extern(C) __gshared ubyte _hulk_rodata_end;
|
|
private extern extern(C) __gshared ubyte _hulk_rodata_size;
|
|
|
|
private extern extern(C) __gshared ubyte _hulk_data_start;
|
|
private extern extern(C) __gshared ubyte _hulk_data_end;
|
|
private extern extern(C) __gshared ubyte _hulk_data_size;
|
|
|
|
private extern extern(C) __gshared ubyte _hulk_bss_start;
|
|
private extern extern(C) __gshared ubyte _hulk_bss_end;
|
|
private extern extern(C) __gshared ubyte _hulk_bss_size;
|
|
|
|
/* hulk_binary includes header, text, rodata, and data */
|
|
private extern extern(C) __gshared ubyte _hulk_binary_size;
|
|
|
|
/* hulk_mem includes header, text, rodata, data, and bss */
|
|
private extern extern(C) __gshared ubyte _hulk_mem_start;
|
|
private extern extern(C) __gshared ubyte _hulk_mem_end;
|
|
private extern extern(C) __gshared ubyte _hulk_mem_size;
|
|
|
|
/**
|
|
* This struct provides access to linker-defined symbols.
|
|
*/
|
|
public struct LinkerAddresses
|
|
{
|
|
public static @property ulong hulk_header_start()
|
|
{
|
|
return cast(ulong)&_hulk_header_start;
|
|
}
|
|
|
|
public static @property ulong hulk_header_end()
|
|
{
|
|
return cast(ulong)&_hulk_header_end;
|
|
}
|
|
|
|
public static @property ulong hulk_header_size()
|
|
{
|
|
return cast(ulong)&_hulk_header_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_text_start()
|
|
{
|
|
return cast(ulong)&_hulk_text_start;
|
|
}
|
|
|
|
public static @property ulong hulk_text_end()
|
|
{
|
|
return cast(ulong)&_hulk_text_end;
|
|
}
|
|
|
|
public static @property ulong hulk_text_size()
|
|
{
|
|
return cast(ulong)&_hulk_text_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_rodata_start()
|
|
{
|
|
return cast(ulong)&_hulk_rodata_start;
|
|
}
|
|
|
|
public static @property ulong hulk_rodata_end()
|
|
{
|
|
return cast(ulong)&_hulk_rodata_end;
|
|
}
|
|
|
|
public static @property ulong hulk_rodata_size()
|
|
{
|
|
return cast(ulong)&_hulk_rodata_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_data_start()
|
|
{
|
|
return cast(ulong)&_hulk_data_start;
|
|
}
|
|
|
|
public static @property ulong hulk_data_end()
|
|
{
|
|
return cast(ulong)&_hulk_data_end;
|
|
}
|
|
|
|
public static @property ulong hulk_data_size()
|
|
{
|
|
return cast(ulong)&_hulk_data_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_bss_start()
|
|
{
|
|
return cast(ulong)&_hulk_bss_start;
|
|
}
|
|
|
|
public static @property ulong hulk_bss_end()
|
|
{
|
|
return cast(ulong)&_hulk_bss_end;
|
|
}
|
|
|
|
public static @property ulong hulk_bss_size()
|
|
{
|
|
return cast(ulong)&_hulk_bss_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_binary_size()
|
|
{
|
|
return cast(ulong)&_hulk_binary_size;
|
|
}
|
|
|
|
|
|
public static @property ulong hulk_mem_start()
|
|
{
|
|
return cast(ulong)&_hulk_mem_start;
|
|
}
|
|
|
|
public static @property ulong hulk_mem_end()
|
|
{
|
|
return cast(ulong)&_hulk_mem_end;
|
|
}
|
|
|
|
public static @property ulong hulk_mem_size()
|
|
{
|
|
return cast(ulong)&_hulk_mem_size;
|
|
}
|
|
}
|