1995-08-17 22:53:56 +00:00
|
|
|
# Linker script for PE.
|
1997-06-07 03:48:00 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
|
|
|
|
RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
|
|
|
|
fi
|
|
|
|
|
1995-05-12 18:55:06 +00:00
|
|
|
cat <<EOF
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
|
|
|
|
${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
|
|
|
|
|
1995-05-12 18:55:06 +00:00
|
|
|
${LIB_SEARCH_DIRS}
|
|
|
|
|
|
|
|
ENTRY(_mainCRTStartup)
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
1995-11-25 02:37:58 +00:00
|
|
|
.text ${RELOCATING+ __image_base__ + __section_alignment__ } :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
|
|
|
${RELOCATING+ *(.init)}
|
|
|
|
*(.text)
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+*(.text\$*)}
|
1997-06-07 03:48:00 +00:00
|
|
|
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
|
|
|
|
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
|
|
|
|
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
|
|
|
|
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
|
|
|
|
${RELOCATING+ *(.fini)}
|
|
|
|
/* ??? Why is .gcc_exc here? */
|
|
|
|
${RELOCATING+ *(.gcc_exc)}
|
|
|
|
${RELOCATING+ etext = .;}
|
|
|
|
*(.gcc_except_table)
|
|
|
|
}
|
1995-05-12 18:55:06 +00:00
|
|
|
|
1998-03-25 16:35:13 +00:00
|
|
|
/* The Cygwin32 library uses a section to avoid copying certain data
|
|
|
|
on fork. This used to be named ".data$nocopy". The linker used
|
|
|
|
to include this between __data_start__ and __data_end__, but that
|
|
|
|
breaks building the cygwin32 dll. Instead, we name the section
|
|
|
|
".data_cygwin_nocopy" and explictly include it after __data_end__. */
|
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.data ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+__data_start__ = . ;}
|
1997-06-07 03:48:00 +00:00
|
|
|
*(.data)
|
|
|
|
*(.data2)
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+*(.data\$*)}
|
|
|
|
${RELOCATING+__data_end__ = . ;}
|
|
|
|
${RELOCATING+*(.data_cygwin_nocopy)}
|
|
|
|
}
|
|
|
|
|
|
|
|
.bss ${RELOCATING+BLOCK(__section_alignment__)} :
|
|
|
|
{
|
|
|
|
${RELOCATING+__bss_start__ = . ;}
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
|
|
|
${RELOCATING+__bss_end__ = . ;}
|
1997-06-07 03:48:00 +00:00
|
|
|
}
|
1995-05-12 18:55:06 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.rdata ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
1995-05-12 18:55:06 +00:00
|
|
|
*(.rdata)
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+*(.rdata\$*)}
|
|
|
|
*(.eh_frame)
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.edata ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
|
|
|
*(.edata)
|
1995-11-25 02:37:58 +00:00
|
|
|
}
|
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
/DISCARD/ :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
1995-11-25 02:37:58 +00:00
|
|
|
*(.debug\$S)
|
|
|
|
*(.debug\$T)
|
|
|
|
*(.debug\$F)
|
|
|
|
*(.drectve)
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.idata ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-06-07 03:48:00 +00:00
|
|
|
{
|
|
|
|
/* This cannot currently be handled with grouped sections.
|
|
|
|
See pe.em:sort_sections. */
|
1998-03-25 16:35:13 +00:00
|
|
|
${RELOCATING+*(.idata\$2)}
|
|
|
|
${RELOCATING+*(.idata\$3)}
|
1997-06-07 03:48:00 +00:00
|
|
|
${RELOCATING+ /* These zeroes mark the end of the import list. */}
|
|
|
|
${RELOCATING+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);}
|
1998-03-25 16:35:13 +00:00
|
|
|
${RELOCATING+*(.idata\$4)}
|
|
|
|
${RELOCATING+*(.idata\$5)}
|
|
|
|
${RELOCATING+*(.idata\$6)}
|
|
|
|
${RELOCATING+*(.idata\$7)}
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1998-03-19 23:04:54 +00:00
|
|
|
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+*(.CRT\$*)}
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
|
1995-11-25 02:37:58 +00:00
|
|
|
{
|
1996-04-30 03:33:23 +00:00
|
|
|
/* end is deprecated, don't use it */
|
1997-06-07 03:48:00 +00:00
|
|
|
${RELOCATING+ end = .;}
|
|
|
|
${RELOCATING+ __end__ = .;}
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.reloc ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-10-15 18:53:18 +00:00
|
|
|
{
|
|
|
|
*(.reloc)
|
|
|
|
}
|
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
|
1997-10-15 18:53:18 +00:00
|
|
|
{
|
|
|
|
*(.rsrc)
|
1998-03-19 23:04:54 +00:00
|
|
|
${RELOCATING+*(.rsrc\$*)}
|
1997-10-15 18:53:18 +00:00
|
|
|
}
|
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
[ .stab ]
|
|
|
|
}
|
|
|
|
|
1998-03-19 23:04:54 +00:00
|
|
|
.stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
[ .stabstr ]
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
|
|
|
EOF
|