2013-04-23 17:44:36 +08:00
|
|
|
#ifdef __x86_64__
|
|
|
|
OUTPUT_FORMAT(pei-x86-64)
|
|
|
|
SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api");
|
|
|
|
#else
|
2022-07-14 18:33:21 +08:00
|
|
|
#error unimplemented for this target
|
2013-04-23 17:44:36 +08:00
|
|
|
#endif
|
|
|
|
#define __CONCAT1(a,b) a##b
|
|
|
|
#define __CONCAT(a,b) __CONCAT1(a,b)
|
|
|
|
#define _SYM(x) __CONCAT(__USER_LABEL_PREFIX__, x)
|
2001-08-31 13:06:14 +08:00
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text __image_base__ + __section_alignment__ :
|
|
|
|
{
|
|
|
|
*(.init)
|
|
|
|
*(.text)
|
2013-04-23 17:44:36 +08:00
|
|
|
*(.text.*)
|
2001-08-31 13:06:14 +08:00
|
|
|
*(SORT(.text$*))
|
|
|
|
*(.glue_7t)
|
|
|
|
*(.glue_7)
|
2013-04-23 17:44:36 +08:00
|
|
|
#ifdef __x86_64__
|
|
|
|
. = ALIGN(8);
|
|
|
|
___CTOR_LIST__ = .; __CTOR_LIST__ = .;
|
|
|
|
LONG (-1); LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); LONG (0);
|
|
|
|
___DTOR_LIST__ = .; __DTOR_LIST__ = .;
|
|
|
|
LONG (-1); LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0); LONG (0);
|
|
|
|
#else
|
2005-06-01 11:46:56 +08:00
|
|
|
___CTOR_LIST__ = .; __CTOR_LIST__ = .;
|
2002-06-24 02:55:23 +08:00
|
|
|
LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0);
|
2005-06-01 11:46:56 +08:00
|
|
|
___DTOR_LIST__ = .; __DTOR_LIST__ = .;
|
2002-06-24 02:55:23 +08:00
|
|
|
LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0);
|
2013-04-23 17:44:36 +08:00
|
|
|
#endif
|
2001-08-31 13:06:14 +08:00
|
|
|
*(.fini)
|
|
|
|
/* ??? Why is .gcc_exc here? */
|
|
|
|
*(.gcc_exc)
|
|
|
|
etext = .;
|
|
|
|
*(.gcc_except_table)
|
|
|
|
}
|
2005-06-01 11:46:56 +08:00
|
|
|
.autoload_text ALIGN(__section_alignment__) :
|
|
|
|
{
|
2005-06-30 07:05:41 +08:00
|
|
|
*(.*_autoload_text);
|
2005-06-01 11:46:56 +08:00
|
|
|
}
|
2001-08-31 13:24:36 +08:00
|
|
|
/* The Cygwin DLL uses a section to avoid copying certain data
|
2013-04-23 17:44:36 +08:00
|
|
|
on fork. This used to be named ".data$nocopy". The linker used
|
2001-08-31 13:06:14 +08:00
|
|
|
to include this between __data_start__ and __data_end__, but that
|
2013-04-23 17:44:36 +08:00
|
|
|
breaks building the cygwin dll. Instead, we name the section
|
|
|
|
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
|
2005-06-01 11:46:56 +08:00
|
|
|
.data ALIGN(__section_alignment__) :
|
2001-08-31 13:06:14 +08:00
|
|
|
{
|
2005-06-01 11:46:56 +08:00
|
|
|
__data_start__ = .;
|
2001-08-31 13:06:14 +08:00
|
|
|
*(.data)
|
|
|
|
*(.data2)
|
|
|
|
*(SORT(.data$*))
|
2005-06-01 11:46:56 +08:00
|
|
|
__data_end__ = .;
|
2001-09-01 02:16:16 +08:00
|
|
|
*(.data_cygwin_nocopy)
|
2001-08-31 13:06:14 +08:00
|
|
|
}
|
2005-06-01 11:46:56 +08:00
|
|
|
.rdata ALIGN(__section_alignment__) :
|
2001-08-31 13:06:14 +08:00
|
|
|
{
|
2012-07-09 22:55:02 +08:00
|
|
|
*(.rdata)
|
2001-08-31 13:06:14 +08:00
|
|
|
*(SORT(.rdata$*))
|
2013-04-23 17:44:36 +08:00
|
|
|
*(.rdata_cygwin_nocopy)
|
2014-04-08 22:13:59 +08:00
|
|
|
___RUNTIME_PSEUDO_RELOC_LIST__ = .;
|
|
|
|
__RUNTIME_PSEUDO_RELOC_LIST__ = .;
|
2014-02-11 14:27:57 +08:00
|
|
|
*(.rdata_runtime_pseudo_reloc)
|
2014-04-08 22:13:59 +08:00
|
|
|
___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
|
|
|
|
__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
|
|
|
|
}
|
2013-07-10 20:15:32 +08:00
|
|
|
.eh_frame ALIGN(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.eh_frame*)
|
|
|
|
}
|
2005-06-01 11:46:56 +08:00
|
|
|
.pdata ALIGN(__section_alignment__) :
|
2001-08-31 13:06:14 +08:00
|
|
|
{
|
2013-04-23 17:44:36 +08:00
|
|
|
*(.pdata*)
|
|
|
|
}
|
|
|
|
#ifdef __x86_64__
|
|
|
|
.xdata ALIGN(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.xdata*)
|
2001-08-31 13:06:14 +08:00
|
|
|
}
|
2013-04-23 17:44:36 +08:00
|
|
|
#endif
|
2005-06-01 11:46:56 +08:00
|
|
|
.bss ALIGN(__section_alignment__) :
|
2001-08-31 13:06:14 +08:00
|
|
|
{
|
2005-06-01 11:46:56 +08:00
|
|
|
__bss_start__ = .;
|
2001-08-31 13:06:14 +08:00
|
|
|
*(.bss)
|
2001-09-01 02:16:16 +08:00
|
|
|
*(COMMON)
|
2005-06-01 11:46:56 +08:00
|
|
|
__bss_end__ = .;
|
2001-08-31 13:06:14 +08:00
|
|
|
}
|
2005-06-01 11:46:56 +08:00
|
|
|
.edata ALIGN(__section_alignment__) :
|
2001-08-31 13:06:14 +08:00
|
|
|
{
|
|
|
|
*(.edata)
|
|
|
|
}
|
2005-06-09 04:18:23 +08:00
|
|
|
.reloc BLOCK(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.reloc)
|
|
|
|
}
|
2005-06-10 04:46:00 +08:00
|
|
|
.cygwin_dll_common ALIGN(__section_alignment__):
|
|
|
|
{
|
|
|
|
*(.cygwin_dll_common)
|
|
|
|
}
|
2014-02-11 14:27:57 +08:00
|
|
|
.idata ALIGN(__section_alignment__) :
|
|
|
|
{
|
|
|
|
/* This cannot currently be handled with grouped sections.
|
|
|
|
See pe.em:sort_sections. */
|
|
|
|
SORT(*)(.idata$2)
|
|
|
|
SORT(*)(.idata$3)
|
|
|
|
/* These zeroes mark the end of the import list. */
|
|
|
|
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
|
|
|
SORT(*)(.idata$4)
|
|
|
|
SORT(*)(.idata$5)
|
|
|
|
SORT(*)(.idata$6)
|
|
|
|
SORT(*)(.idata$7)
|
|
|
|
. = ALIGN(16);
|
|
|
|
}
|
2005-08-08 10:27:43 +08:00
|
|
|
.gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD):
|
|
|
|
{
|
|
|
|
BYTE(0) /* c */
|
|
|
|
BYTE(0) /* y */
|
|
|
|
BYTE(0) /* g */
|
|
|
|
BYTE(0) /* w */
|
|
|
|
BYTE(0) /* i */
|
|
|
|
BYTE(0) /* n */
|
|
|
|
BYTE(0) /* 1 */
|
|
|
|
BYTE(0) /* . */
|
|
|
|
BYTE(0) /* d */
|
|
|
|
BYTE(0) /* b */
|
|
|
|
BYTE(0) /* g */
|
|
|
|
BYTE(0) /* \0 */
|
|
|
|
LONG(0) /* checksum */
|
|
|
|
}
|
2014-02-11 14:27:57 +08:00
|
|
|
.rsrc BLOCK(__section_alignment__) :
|
2005-08-08 10:27:43 +08:00
|
|
|
{
|
2014-02-11 14:27:57 +08:00
|
|
|
*(.rsrc)
|
|
|
|
*(SORT(.rsrc$*))
|
2014-04-08 22:13:59 +08:00
|
|
|
_SYM (_cygheap_start) = .;
|
2005-08-08 10:27:43 +08:00
|
|
|
}
|
|
|
|
.cygheap ALIGN(__section_alignment__) :
|
|
|
|
{
|
2013-04-23 17:44:36 +08:00
|
|
|
#ifdef __x86_64__
|
|
|
|
. = . + (3072 * 1024);
|
|
|
|
#else
|
2011-03-19 02:16:37 +08:00
|
|
|
. = . + (2048 * 1024);
|
2013-04-23 17:44:36 +08:00
|
|
|
#endif
|
2011-02-19 00:15:20 +08:00
|
|
|
. = ALIGN(0x10000);
|
2014-04-08 22:13:59 +08:00
|
|
|
_SYM (_cygheap_end) = .;
|
2005-08-08 10:27:43 +08:00
|
|
|
}
|
2001-08-31 13:06:14 +08:00
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.debug$S)
|
|
|
|
*(.debug$T)
|
|
|
|
*(.debug$F)
|
|
|
|
*(.drectve)
|
|
|
|
}
|
2005-06-01 11:46:56 +08:00
|
|
|
.stab ALIGN(__section_alignment__) (NOLOAD) :
|
|
|
|
{
|
2005-06-09 04:18:23 +08:00
|
|
|
*(.stab)
|
2005-06-01 11:46:56 +08:00
|
|
|
}
|
|
|
|
.stabstr ALIGN(__section_alignment__) (NOLOAD) :
|
|
|
|
{
|
2005-06-09 04:18:23 +08:00
|
|
|
*(.stabstr)
|
2005-06-01 11:46:56 +08:00
|
|
|
}
|
|
|
|
/* DWARF 1.1 and DWARF 2 */
|
|
|
|
.debug_aranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_aranges) }
|
|
|
|
.debug_pubnames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_pubnames) }
|
2013-04-23 17:44:36 +08:00
|
|
|
.debug_pubtypes ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_pubtypes) }
|
2005-06-01 11:46:56 +08:00
|
|
|
/* DWARF 2 */
|
|
|
|
.debug_info ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_info) }
|
|
|
|
.debug_abbrev ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_abbrev) }
|
|
|
|
.debug_line ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_line) }
|
|
|
|
.debug_frame ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_frame) }
|
|
|
|
.debug_str ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_str) }
|
|
|
|
.debug_loc ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_loc) }
|
|
|
|
.debug_macinfo ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macinfo) }
|
2013-04-23 17:44:36 +08:00
|
|
|
/* SGI/MIPS DWARF 2 extensions. */
|
|
|
|
.debug_weaknames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_weaknames) }
|
|
|
|
.debug_funcnames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_funcnames) }
|
|
|
|
.debug_typenames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_typenames) }
|
|
|
|
.debug_varnames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_varnames) }
|
|
|
|
.debug_macro ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macro) }
|
2021-08-27 20:26:42 +08:00
|
|
|
/* DWARF 3 */
|
2005-06-01 11:46:56 +08:00
|
|
|
.debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) }
|
2021-08-27 20:26:42 +08:00
|
|
|
/* DWARF 4, merged back into .debug_info with DWARF 5 */
|
2013-04-23 17:44:36 +08:00
|
|
|
.debug_types ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_types .gnu.linkonce.wt.*) }
|
2021-08-27 20:26:42 +08:00
|
|
|
/* DWARF 5 */
|
|
|
|
.debug_loclists ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_loclists) }
|
|
|
|
.debug_rnglists ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_rnglists) }
|
|
|
|
.debug_line_str ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_line_str) }
|
|
|
|
|
2001-08-31 13:06:14 +08:00
|
|
|
}
|