2013-04-23 11:44:36 +02:00
|
|
|
#ifdef __x86_64__
|
|
|
|
OUTPUT_FORMAT(pei-x86-64)
|
|
|
|
SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api");
|
|
|
|
#else
|
|
|
|
#undef i386
|
2001-08-31 07:06:14 +02:00
|
|
|
OUTPUT_FORMAT(pei-i386)
|
2013-04-23 11:44:36 +02:00
|
|
|
SEARCH_DIR("/usr/i686-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api");
|
|
|
|
#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 07:06:14 +02:00
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text __image_base__ + __section_alignment__ :
|
|
|
|
{
|
|
|
|
*(.init)
|
|
|
|
*(.text)
|
2013-04-23 11:44:36 +02:00
|
|
|
#ifdef __x86_64__
|
|
|
|
*(.text.*)
|
|
|
|
#endif
|
2001-08-31 07:06:14 +02:00
|
|
|
*(SORT(.text$*))
|
|
|
|
*(.glue_7t)
|
|
|
|
*(.glue_7)
|
2013-04-23 11:44:36 +02: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 05:46:56 +02:00
|
|
|
___CTOR_LIST__ = .; __CTOR_LIST__ = .;
|
2002-06-23 20:55:23 +02:00
|
|
|
LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0);
|
2005-06-01 05:46:56 +02:00
|
|
|
___DTOR_LIST__ = .; __DTOR_LIST__ = .;
|
2002-06-23 20:55:23 +02:00
|
|
|
LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0);
|
2013-04-23 11:44:36 +02:00
|
|
|
#endif
|
2001-08-31 07:06:14 +02:00
|
|
|
*(.fini)
|
|
|
|
/* ??? Why is .gcc_exc here? */
|
|
|
|
*(.gcc_exc)
|
|
|
|
etext = .;
|
|
|
|
*(.gcc_except_table)
|
|
|
|
}
|
2005-06-01 05:46:56 +02:00
|
|
|
.autoload_text ALIGN(__section_alignment__) :
|
|
|
|
{
|
2005-06-30 01:05:41 +02:00
|
|
|
*(.*_autoload_text);
|
2005-06-01 05:46:56 +02:00
|
|
|
}
|
2001-08-31 07:24:36 +02:00
|
|
|
/* The Cygwin DLL uses a section to avoid copying certain data
|
2013-04-23 11:44:36 +02:00
|
|
|
on fork. This used to be named ".data$nocopy". The linker used
|
2001-08-31 07:06:14 +02:00
|
|
|
to include this between __data_start__ and __data_end__, but that
|
2013-04-23 11:44:36 +02:00
|
|
|
breaks building the cygwin dll. Instead, we name the section
|
|
|
|
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
|
2005-06-01 05:46:56 +02:00
|
|
|
.data ALIGN(__section_alignment__) :
|
2001-08-31 07:06:14 +02:00
|
|
|
{
|
2005-06-01 05:46:56 +02:00
|
|
|
__data_start__ = .;
|
2001-08-31 07:06:14 +02:00
|
|
|
*(.data)
|
|
|
|
*(.data2)
|
|
|
|
*(SORT(.data$*))
|
2005-06-01 05:46:56 +02:00
|
|
|
__data_end__ = .;
|
2001-08-31 20:16:16 +02:00
|
|
|
*(.data_cygwin_nocopy)
|
2001-08-31 07:06:14 +02:00
|
|
|
}
|
2005-06-01 05:46:56 +02:00
|
|
|
.rdata ALIGN(__section_alignment__) :
|
2001-08-31 07:06:14 +02:00
|
|
|
{
|
2012-07-09 16:55:02 +02:00
|
|
|
*(.rdata)
|
2001-08-31 07:06:14 +02:00
|
|
|
*(SORT(.rdata$*))
|
|
|
|
*(.eh_frame)
|
2013-04-23 11:44:36 +02:00
|
|
|
*(.rdata_cygwin_nocopy)
|
2001-08-31 07:06:14 +02:00
|
|
|
}
|
2005-06-01 05:46:56 +02:00
|
|
|
.pdata ALIGN(__section_alignment__) :
|
2001-08-31 07:06:14 +02:00
|
|
|
{
|
2013-04-23 11:44:36 +02:00
|
|
|
*(.pdata*)
|
|
|
|
}
|
|
|
|
#ifdef __x86_64__
|
|
|
|
.xdata ALIGN(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.xdata*)
|
2001-08-31 07:06:14 +02:00
|
|
|
}
|
2013-04-23 11:44:36 +02:00
|
|
|
#endif
|
2005-06-01 05:46:56 +02:00
|
|
|
.bss ALIGN(__section_alignment__) :
|
2001-08-31 07:06:14 +02:00
|
|
|
{
|
2005-06-01 05:46:56 +02:00
|
|
|
__bss_start__ = .;
|
2001-08-31 07:06:14 +02:00
|
|
|
*(.bss)
|
2001-08-31 20:16:16 +02:00
|
|
|
*(COMMON)
|
2005-06-01 05:46:56 +02:00
|
|
|
__bss_end__ = .;
|
2001-08-31 07:06:14 +02:00
|
|
|
}
|
2005-06-01 05:46:56 +02:00
|
|
|
.edata ALIGN(__section_alignment__) :
|
2001-08-31 07:06:14 +02:00
|
|
|
{
|
|
|
|
*(.edata)
|
|
|
|
}
|
2005-06-08 22:18:23 +02:00
|
|
|
.rsrc BLOCK(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.rsrc)
|
|
|
|
*(SORT(.rsrc$*))
|
|
|
|
}
|
|
|
|
.reloc BLOCK(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.reloc)
|
|
|
|
}
|
2005-06-09 22:46:00 +02:00
|
|
|
.cygwin_dll_common ALIGN(__section_alignment__):
|
|
|
|
{
|
|
|
|
*(.cygwin_dll_common)
|
|
|
|
}
|
2005-08-08 04:27:43 +02: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 */
|
|
|
|
}
|
|
|
|
.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);
|
2013-04-23 11:44:36 +02:00
|
|
|
_SYM (_cygheap_start) = ABSOLUTE(.);
|
2005-08-08 04:27:43 +02:00
|
|
|
}
|
|
|
|
.cygheap ALIGN(__section_alignment__) :
|
|
|
|
{
|
2013-04-23 11:44:36 +02:00
|
|
|
#ifdef __x86_64__
|
|
|
|
. = . + (3072 * 1024);
|
|
|
|
#else
|
2011-03-18 19:16:37 +01:00
|
|
|
. = . + (2048 * 1024);
|
2013-04-23 11:44:36 +02:00
|
|
|
#endif
|
2011-02-18 17:15:20 +01:00
|
|
|
. = ALIGN(0x10000);
|
2013-04-23 11:44:36 +02:00
|
|
|
_SYM (_cygheap_end) = ABSOLUTE(.);
|
2005-08-08 04:27:43 +02:00
|
|
|
}
|
2001-08-31 07:06:14 +02:00
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.debug$S)
|
|
|
|
*(.debug$T)
|
|
|
|
*(.debug$F)
|
|
|
|
*(.drectve)
|
|
|
|
}
|
2005-06-01 05:46:56 +02:00
|
|
|
.stab ALIGN(__section_alignment__) (NOLOAD) :
|
|
|
|
{
|
2005-06-08 22:18:23 +02:00
|
|
|
*(.stab)
|
2005-06-01 05:46:56 +02:00
|
|
|
}
|
|
|
|
.stabstr ALIGN(__section_alignment__) (NOLOAD) :
|
|
|
|
{
|
2005-06-08 22:18:23 +02:00
|
|
|
*(.stabstr)
|
2005-06-01 05:46:56 +02: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 11:44:36 +02:00
|
|
|
.debug_pubtypes ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_pubtypes) }
|
2005-06-01 05:46:56 +02: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 11:44:36 +02: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) }
|
|
|
|
/* DWARF 3. */
|
2005-06-01 05:46:56 +02:00
|
|
|
.debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) }
|
2013-04-23 11:44:36 +02:00
|
|
|
/* DWARF 4. */
|
|
|
|
.debug_types ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_types .gnu.linkonce.wt.*) }
|
2001-08-31 07:06:14 +02:00
|
|
|
}
|