changeset 1213:1ab9c4a77230

[xemacs-hg @ 2003-01-15 08:46:18 by youngs] 2003-01-14 Sergey Okhapkin <sos@prospect.com.ru> * Makefile.in.in (ldflags): re-order sections for gcc 3.2. * s/cygwin.sc: new linker file.
author youngs
date Wed, 15 Jan 2003 08:46:22 +0000
parents df55bd0e8275
children 4be1d80f2abd
files src/ChangeLog src/Makefile.in.in src/s/cygwin.sc
diffstat 3 files changed, 120 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Jan 15 07:24:36 2003 +0000
+++ b/src/ChangeLog	Wed Jan 15 08:46:22 2003 +0000
@@ -1,3 +1,8 @@
+2003-01-14  Sergey Okhapkin <sos@prospect.com.ru>
+
+	* Makefile.in.in (ldflags): re-order sections for gcc 3.2.
+	* s/cygwin.sc: new linker file.
+
 2003-01-11  Mike Sperber  <mike@xemacs.org>
 
 	* window.c (Fdelete_window): Make sure that
--- a/src/Makefile.in.in	Wed Jan 15 07:24:36 2003 +0000
+++ b/src/Makefile.in.in	Wed Jan 15 08:46:22 2003 +0000
@@ -273,6 +273,9 @@
 cflags   = $(CFLAGS) $(cppflags)
 #if defined (WIN32_NATIVE) || defined (CYGWIN)
 ldflags  = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
+# if defined (CYGWIN)
+ldflags += -Wl,--script=s/cygwin.sc
+# endif
 #else
 ldflags  = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/s/cygwin.sc	Wed Jan 15 08:46:22 2003 +0000
@@ -0,0 +1,112 @@
+/* Default linker script, for normal executables */
+OUTPUT_FORMAT(pei-i386)
+SEARCH_DIR("/usr/i686-pc-cygwin/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/lib/w32api");
+ENTRY(_mainCRTStartup)
+SECTIONS
+{
+  .text  __image_base__ + __section_alignment__  :
+  {
+     *(.init)
+    *(.text)
+    *(SORT(.text$*))
+    *(.glue_7t)
+    *(.glue_7)
+     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+			LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0);
+     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+			LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor);  LONG (0);
+     *(.fini)
+    /* ??? Why is .gcc_exc here?  */
+     *(.gcc_exc)
+     etext = .;
+    *(.gcc_except_table)
+  }
+  /* The Cygwin32 library uses a section to avoid copying certain data
+     on fork.  This used to be named ".data".  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__. */
+  .data BLOCK(__section_alignment__) :
+  {
+    __data_start__ = . ;
+    *(.data)
+    *(.data2)
+    *(SORT(.data$*))
+    __data_end__ = . ;
+    *(.data_cygwin_nocopy)
+  }
+  .bss BLOCK(__section_alignment__) :
+  {
+    __bss_start__ = . ;
+    *(.bss)
+    *(COMMON)
+    __bss_end__ = . ;
+  }
+  .rdata BLOCK(__section_alignment__) :
+  {
+    *(.rdata)
+    *(SORT(.rdata$*))
+    *(.eh_frame)
+    ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
+    __RUNTIME_PSEUDO_RELOC_LIST__ = .;
+    *(.rdata_runtime_pseudo_reloc)
+    ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+    __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+  }
+  .pdata BLOCK(__section_alignment__) :
+  {
+    *(.pdata)
+  }
+  .edata BLOCK(__section_alignment__) :
+  {
+    *(.edata)
+  }
+  /DISCARD/ :
+  {
+    *(.debug$S)
+    *(.debug$T)
+    *(.debug$F)
+    *(.drectve)
+  }
+  .idata BLOCK(__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)
+  }
+  .CRT BLOCK(__section_alignment__) :
+  {
+    *(SORT(.CRT$*))
+  }
+  .endjunk BLOCK(__section_alignment__) :
+  {
+    /* end is deprecated, don't use it */
+     end = .;
+     _end = .;
+     __end__ = .;
+  }
+  .rsrc BLOCK(__section_alignment__) :
+  {
+    *(.rsrc)
+    *(SORT(.rsrc$*))
+  }
+  .reloc BLOCK(__section_alignment__) :
+  {
+    *(.reloc)
+  }
+  .stab BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    [ .stab ]
+  }
+  .stabstr BLOCK(__section_alignment__) (NOLOAD) :
+  {
+    [ .stabstr ]
+  }
+}