newlib: importing data from DLL

git-svn-id: svn://kolibrios.org@6312 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-03-09 22:10:47 +00:00
parent b50e632506
commit b0dc7f9b6b
4 changed files with 28 additions and 6 deletions

View File

@ -79,12 +79,12 @@ SECTIONS
___iend = . ;
}
/* .eh_frame BLOCK(16) :
.eh_frame BLOCK(16) :
{
PROVIDE (___EH_FRAME_BEGIN__ = .) ;
*(.eh_frame*)
}
*/
.idata ALIGN(16):
{
__idata_start = .;
@ -120,7 +120,6 @@ SECTIONS
*(.drectve)
*(.note.GNU-stack)
*(.comment)
*(.eh_frame)
*(.debug_abbrev)
*(.debug_info)
*(.debug_line)

View File

@ -3,7 +3,7 @@ CC = kos32-gcc
AR = kos32-ar
LD = kos32-ld
CFLAGS = -c -O2 -fno-ident -fomit-frame-pointer -fexceptions -DBUILD_DLL -DMISSING_SYSCALL_NAMES
CFLAGS = -c -O2 -fno-ident -fomit-frame-pointer -fexceptions -DMISSING_SYSCALL_NAMES
LDFLAGS = -shared -s -T libcdll.lds --out-implib libc.dll.a --image-base 0
#LDFLAGS+= --output-def libc.orig.def
ARFLAGS = crs
@ -15,7 +15,7 @@ LIBC_INCLUDES = $(LIBC_TOPDIR)/include
NAME:= libc
DEFINES:= -D_IEEE_LIBM -DHAVE_RENAME
DEFINES:= -D_IEEE_LIBM -DHAVE_RENAME -DBUILD_LIBC
INCLUDES:= -I $(LIBC_INCLUDES)

View File

@ -46,6 +46,18 @@ SECTIONS
___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
}
.eh_frame ALIGN(16) :
{
___EH_FRAME_BEGIN___ = .;
*(.eh_frame*);
__EH_FRAME_END__ = .;
}
.CRT ALIGN(16) :
{
___crt_xc_start__ = . ;
@ -113,7 +125,6 @@ SECTIONS
*(.debug$F)
*(.drectve)
*(.note.GNU-stack)
*(.eh_frame)
*(.comment)
*(.debug_abbrev)
*(.debug_info)

View File

@ -169,5 +169,17 @@
/* #undef _ICONV_FROM_ENCODING_WIN_1257 */
/* #undef _ICONV_FROM_ENCODING_WIN_1258 */
#ifdef STATIC_LIBC
#define BUILD_LIBC
#endif
#ifdef BUILD_LIBC
#define __EXPORT
#define __IMPORT
#else
#define __EXPORT __attribute__ ((dllexport))
#define __IMPORT __attribute__ ((dllimport))
#endif
#endif /* !__NEWLIB_H__ */