home *** CD-ROM | disk | FTP | other *** search
/ Beginning C++ Through Gam…rogramming (2nd Edition) / BCGP2E.ISO / bloodshed / devcpp-4.9.9.2_setup.exe / i386pe.xbn < prev    next >
Text File  |  2005-01-29  |  5KB  |  209 lines

  1. /* Script for -N: mix text and data on same page; don't align data */
  2. OUTPUT_FORMAT(pei-i386)
  3. SEARCH_DIR("/mingw/mingw32/lib"); SEARCH_DIR("/mingw/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
  4. ENTRY(_mainCRTStartup)
  5. SECTIONS
  6. {
  7.   .text  __image_base__ + __section_alignment__  :
  8.   {
  9.      *(.init)
  10.     *(.text)
  11.     *(SORT(.text$*))
  12.     *(.glue_7t)
  13.     *(.glue_7)
  14.        ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
  15.             LONG (-1);
  16.             *(EXCLUDE_FILE (*crtend.o) .ctors);
  17.             *(.ctor);
  18.             *(SORT(.ctors.*));
  19.             *crtend.o (.ctors);
  20.             LONG (0);
  21.         ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
  22.             LONG (-1);
  23.             *(EXCLUDE_FILE (*crtend.o) .dtors);
  24.             *(.dtor);
  25.             *(SORT(.dtors.*));
  26.             *crtend.o (.dtors);
  27.             LONG (0);
  28.      *(.fini)
  29.     /* ??? Why is .gcc_exc here?  */
  30.      *(.gcc_exc)
  31.     PROVIDE (etext = .);
  32.     *(.gcc_except_table)
  33.   }
  34.   /* The Cygwin32 library uses a section to avoid copying certain data
  35.      on fork.  This used to be named ".data".  The linker used
  36.      to include this between __data_start__ and __data_end__, but that
  37.      breaks building the cygwin32 dll.  Instead, we name the section
  38.      ".data_cygwin_nocopy" and explictly include it after __data_end__. */
  39.   .data BLOCK(__section_alignment__) :
  40.   {
  41.     __data_start__ = . ;
  42.     *(.data)
  43.     *(.data2)
  44.     *(SORT(.data$*))
  45.     __data_end__ = . ;
  46.     *(.data_cygwin_nocopy)
  47.   }
  48.   .rdata BLOCK(__section_alignment__) :
  49.   {
  50.     *(.rdata)
  51.     *(SORT(.rdata$*))
  52.     *(.eh_frame)
  53.     ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
  54.     __RUNTIME_PSEUDO_RELOC_LIST__ = .;
  55.     *(.rdata_runtime_pseudo_reloc)
  56.     ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
  57.     __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
  58.   }
  59.   .pdata BLOCK(__section_alignment__) :
  60.   {
  61.     *(.pdata)
  62.   }
  63.   .bss BLOCK(__section_alignment__) :
  64.   {
  65.     __bss_start__ = . ;
  66.     *(.bss)
  67.     *(COMMON)
  68.     __bss_end__ = . ;
  69.   }
  70.   .edata BLOCK(__section_alignment__) :
  71.   {
  72.     *(.edata)
  73.   }
  74.   /DISCARD/ :
  75.   {
  76.     *(.debug$S)
  77.     *(.debug$T)
  78.     *(.debug$F)
  79.     *(.drectve)
  80.   }
  81.   .idata BLOCK(__section_alignment__) :
  82.   {
  83.     /* This cannot currently be handled with grouped sections.
  84.     See pe.em:sort_sections.  */
  85.     SORT(*)(.idata$2)
  86.     SORT(*)(.idata$3)
  87.     /* These zeroes mark the end of the import list.  */
  88.     LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
  89.     SORT(*)(.idata$4)
  90.     SORT(*)(.idata$5)
  91.     SORT(*)(.idata$6)
  92.     SORT(*)(.idata$7)
  93.   }
  94.   .CRT BLOCK(__section_alignment__) :
  95.   {
  96.     ___crt_xc_start__ = . ;
  97.     *(SORT(.CRT$XC*))  /* C initialization */
  98.     ___crt_xc_end__ = . ;
  99.     ___crt_xi_start__ = . ;
  100.     *(SORT(.CRT$XI*))  /* C++ initialization */
  101.     ___crt_xi_end__ = . ;
  102.     ___crt_xl_start__ = . ;
  103.     *(SORT(.CRT$XL*))  /* TLS callbacks */
  104.     /* ___crt_xl_end__ is defined in the TLS Directory support code */
  105.     ___crt_xp_start__ = . ;
  106.     *(SORT(.CRT$XP*))  /* Pre-termination */
  107.     ___crt_xp_end__ = . ;
  108.     ___crt_xt_start__ = . ;
  109.     *(SORT(.CRT$XT*))  /* Termination */
  110.     ___crt_xt_end__ = . ;
  111.   }
  112.   .tls BLOCK(__section_alignment__) :
  113.   {
  114.     ___tls_start__ = . ;
  115.     *(.tls)
  116.     *(.tls$)
  117.     *(SORT(.tls$*))
  118.     ___tls_end__ = . ;
  119.   }
  120.   .endjunk BLOCK(__section_alignment__) :
  121.   {
  122.     /* end is deprecated, don't use it */
  123.     PROVIDE (end = .);
  124.     PROVIDE ( _end = .);
  125.      __end__ = .;
  126.   }
  127.   .rsrc BLOCK(__section_alignment__) :
  128.   {
  129.     *(.rsrc)
  130.     *(SORT(.rsrc$*))
  131.   }
  132.   .reloc BLOCK(__section_alignment__) :
  133.   {
  134.     *(.reloc)
  135.   }
  136.   .stab BLOCK(__section_alignment__) (NOLOAD) :
  137.   {
  138.     *(.stab)
  139.   }
  140.   .stabstr BLOCK(__section_alignment__) (NOLOAD) :
  141.   {
  142.     *(.stabstr)
  143.   }
  144.   /* DWARF debug sections.
  145.      Symbols in the DWARF debugging sections are relative to the beginning
  146.      of the section.  Unlike other targets that fake this by putting the
  147.      section VMA at 0, the PE format will not allow it.  */
  148.   /* DWARF 1.1 and DWARF 2.  */
  149.   .debug_aranges BLOCK(__section_alignment__) (NOLOAD) :
  150.   {
  151.     *(.debug_aranges)
  152.   }
  153.   .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
  154.   {
  155.     *(.debug_pubnames)
  156.   }
  157.   /* DWARF 2.  */
  158.   .debug_info BLOCK(__section_alignment__) (NOLOAD) :
  159.   {
  160.     *(.debug_info) *(.gnu.linkonce.wi.*)
  161.   }
  162.   .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
  163.   {
  164.     *(.debug_abbrev)
  165.   }
  166.   .debug_line BLOCK(__section_alignment__) (NOLOAD) :
  167.   {
  168.     *(.debug_line)
  169.   }
  170.   .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
  171.   {
  172.     *(.debug_frame)
  173.   }
  174.   .debug_str BLOCK(__section_alignment__) (NOLOAD) :
  175.   {
  176.     *(.debug_str)
  177.   }
  178.   .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
  179.   {
  180.     *(.debug_loc)
  181.   }
  182.   .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
  183.   {
  184.     *(.debug_macinfo)
  185.   }
  186.   /* SGI/MIPS DWARF 2 extensions.  */
  187.   .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
  188.   {
  189.     *(.debug_weaknames)
  190.   }
  191.   .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
  192.   {
  193.     *(.debug_funcnames)
  194.   }
  195.   .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
  196.   {
  197.     *(.debug_typenames)
  198.   }
  199.   .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
  200.   {
  201.     *(.debug_varnames)
  202.   }
  203.   /* DWARF 3.  */
  204.   .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
  205.   {
  206.     *(.debug_ranges)
  207.   }
  208. }
  209.