summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2014-02-11 06:27:57 +0000
committerChristopher Faylor <me@cgf.cx>2014-02-11 06:27:57 +0000
commit026a2445d17e937996ae582f6875fb66b6ac7186 (patch)
treedde4365ec256959e2e5f76249e811505ef65ab7f
parent85827fa6856b5bb3af42453780d61427e2e230b0 (diff)
downloadcygnal-026a2445d17e937996ae582f6875fb66b6ac7186.tar.gz
cygnal-026a2445d17e937996ae582f6875fb66b6ac7186.tar.bz2
cygnal-026a2445d17e937996ae582f6875fb66b6ac7186.zip
* winsup.h (Interlocked*): Use intrinsic versions of Interlocked functions.
* cygwin.sc.in: More closely emulate default pe/i386 linker script.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/cygwin.sc.in46
-rw-r--r--winsup/cygwin/winsup.h4
3 files changed, 38 insertions, 19 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 23717c6c9..ee6da9755 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2014-02-11 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * winsup.h (Interlocked*): Use intrinsic versions of Interlocked
+ functions.
+
+ * cygwin.sc.in: More closely emulate default pe/i386 linker script.
+
2014-02-10 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (cygheap_domain_info::init): Drop accidentally leftover if
diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in
index db64a80e4..279da858f 100644
--- a/winsup/cygwin/cygwin.sc.in
+++ b/winsup/cygwin/cygwin.sc.in
@@ -59,9 +59,17 @@ SECTIONS
{
*(.rdata)
*(SORT(.rdata$*))
- *(.eh_frame)
*(.rdata_cygwin_nocopy)
- }
+ __rt_psrelocs_start = .;
+ *(.rdata_runtime_pseudo_reloc)
+ __rt_psrelocs_end = .;
+
+ }
+ __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;
+ ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+ __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+ ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;
+ __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;
.eh_frame ALIGN(__section_alignment__) :
{
*(.eh_frame*)
@@ -87,11 +95,6 @@ SECTIONS
{
*(.edata)
}
- .rsrc BLOCK(__section_alignment__) :
- {
- *(.rsrc)
- *(SORT(.rsrc$*))
- }
.reloc BLOCK(__section_alignment__) :
{
*(.reloc)
@@ -100,6 +103,20 @@ SECTIONS
{
*(.cygwin_dll_common)
}
+ .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);
+ }
.gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD):
{
BYTE(0) /* c */
@@ -116,19 +133,10 @@ SECTIONS
BYTE(0) /* \0 */
LONG(0) /* checksum */
}
- .idata ALIGN(__section_alignment__) :
+ .rsrc 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)
- . = ALIGN(16);
+ *(.rsrc)
+ *(SORT(.rsrc$*))
_SYM (_cygheap_start) = ABSOLUTE(.);
}
.cygheap ALIGN(__section_alignment__) :
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 0bfd22de4..654e5b1ed 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -285,6 +285,10 @@ extern "C" char _data_start__, _data_end__, _bss_start__, _bss_end__;
extern "C" void (*__CTOR_LIST__) (void);
extern "C" void (*__DTOR_LIST__) (void);
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedIncrement _InterlockedIncrement
+
#ifndef NO_GLOBALS_H
#define _RDATA /* See globals.h */
#include "globals.h"