1995-08-17 22:53:56 +00:00
|
|
|
# Linker script for PE.
|
1995-05-12 18:55:06 +00:00
|
|
|
# These are substituted in as variables in order to get '}' in a shell
|
|
|
|
# conditional expansion.
|
|
|
|
INIT='.init : { *(.init) }'
|
|
|
|
FINI='.fini : { *(.fini) }'
|
|
|
|
cat <<EOF
|
1995-08-17 22:53:56 +00:00
|
|
|
OUTPUT_FORMAT(${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__ } :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
${RELOCATING+ *(.init);}
|
|
|
|
*(.text)
|
1995-11-25 02:37:58 +00:00
|
|
|
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
|
|
|
|
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
|
|
|
|
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
|
|
|
|
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
|
1995-05-12 18:55:06 +00:00
|
|
|
${RELOCATING+ *(.fini);}
|
1996-03-31 08:37:51 +00:00
|
|
|
${RELOCATING+ *(.gcc_exc);}
|
1995-05-12 18:55:06 +00:00
|
|
|
${RELOCATING+ etext = .};
|
|
|
|
}
|
|
|
|
|
1995-11-25 02:37:58 +00:00
|
|
|
.bss BLOCK(__section_alignment__) :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
1995-11-25 02:37:58 +00:00
|
|
|
__bss_start__ = . ;
|
|
|
|
*(.bss) ;
|
1995-05-12 18:55:06 +00:00
|
|
|
*(COMMON);
|
1995-11-25 02:37:58 +00:00
|
|
|
__bss_end__ = . ;
|
|
|
|
}
|
|
|
|
.data BLOCK(__section_alignment__) :
|
|
|
|
{
|
|
|
|
__data_start__ = . ;
|
|
|
|
*(.data);
|
|
|
|
*(.data2);
|
|
|
|
__data_end__ = . ;
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
|
|
|
|
1995-11-25 02:37:58 +00:00
|
|
|
.rdata BLOCK(__section_alignment__) :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
*(.rdata)
|
|
|
|
;
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
1996-04-30 03:33:23 +00:00
|
|
|
.edata BLOCK(__section_alignment__) : {
|
1995-11-25 02:37:58 +00:00
|
|
|
*(.edata) ;
|
|
|
|
}
|
|
|
|
|
1996-03-31 08:37:51 +00:00
|
|
|
|
|
|
|
/DISCARD/ BLOCK(__section_alignment__) : {
|
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
|
|
|
|
|
|
|
.idata BLOCK(__section_alignment__) :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
1995-06-29 00:21:00 +00:00
|
|
|
*(.idata\$2)
|
|
|
|
*(.idata\$3)
|
|
|
|
*(.idata\$4)
|
|
|
|
*(.idata\$5)
|
|
|
|
*(.idata\$6)
|
|
|
|
*(.idata\$7)
|
1995-05-12 18:55:06 +00:00
|
|
|
;
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
.CRT BLOCK(__section_alignment__) :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
1995-06-29 00:21:00 +00:00
|
|
|
*(.CRT\$XCA)
|
|
|
|
*(.CRT\$XCC)
|
|
|
|
*(.CRT\$XCZ)
|
|
|
|
*(.CRT\$XIA)
|
|
|
|
*(.CRT\$XIC)
|
|
|
|
*(.CRT\$XIZ)
|
|
|
|
*(.CRT\$XLA)
|
|
|
|
*(.CRT\$XLZ)
|
|
|
|
*(.CRT\$XPA)
|
|
|
|
*(.CRT\$XPX)
|
|
|
|
*(.CRT\$XPZ)
|
|
|
|
*(.CRT\$XTA)
|
|
|
|
*(.CRT\$XTZ)
|
1995-05-12 18:55:06 +00:00
|
|
|
;
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
.rsrc BLOCK(__section_alignment__) :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
1995-06-29 00:21:00 +00:00
|
|
|
*(.rsrc\$01)
|
|
|
|
*(.rsrc\$02)
|
1995-05-12 18:55:06 +00:00
|
|
|
;
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
|
|
|
.endjunk BLOCK(__section_alignment__) :
|
|
|
|
{
|
1996-04-30 03:33:23 +00:00
|
|
|
/* end is deprecated, don't use it */
|
1995-11-25 02:37:58 +00:00
|
|
|
${RELOCATING+ end = .};
|
1996-04-30 03:33:23 +00:00
|
|
|
${RELOCATING+ __end__ = .};
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
|
|
|
.stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
[ .stab ]
|
|
|
|
}
|
|
|
|
|
1995-11-25 02:37:58 +00:00
|
|
|
.stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
|
1995-05-12 18:55:06 +00:00
|
|
|
{
|
|
|
|
[ .stabstr ]
|
|
|
|
}
|
1995-11-25 02:37:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
.reloc BLOCK(__section_alignment__) :
|
|
|
|
{
|
|
|
|
*(.reloc)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1995-05-12 18:55:06 +00:00
|
|
|
}
|
|
|
|
EOF
|