vg_toolint.c \
vg_translate.c \
vg_transtab.c \
- vg_ldt.c \
vg_cpuid.S
stage2_DEPENDENCIES = $(srcdir)/valgrind.vs x86/stage2.lds
stage2_LDFLAGS=-Wl,--export-dynamic -Wl,-e,_ume_entry -g \
demangle/dyn-string.o \
demangle/safe-ctype.o \
${VG_ARCH}/libarch.a \
+ ${VG_PLATFORM}/libplatform.a \
-ldl
vg_intercept.c: $(srcdir)/gen_intercepts.pl $(srcdir)/vg_intercept.c.base
extern Bool VG_(sk_malloc_called_by_scheduler);
-/* ---------------------------------------------------------------------
- Exports of vg_ldt.c
- ------------------------------------------------------------------ */
-
-/* Simulate the modify_ldt syscall. */
-extern Int VG_(sys_modify_ldt) ( ThreadId tid,
- Int func, void* ptr, UInt bytecount );
-
-/* Simulate the {get,set}_thread_area syscalls. */
-extern Int VG_(sys_set_thread_area) ( ThreadId tid,
- struct vki_modify_ldt_ldt_s* info );
-extern Int VG_(sys_get_thread_area) ( ThreadId tid,
- struct vki_modify_ldt_ldt_s* info );
-
-/* Called from generated code. Given a segment selector and a virtual
- address, return a linear address, and do limit checks too. */
-extern Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr );
-
-
/* ---------------------------------------------------------------------
Exports of vg_libpthread.c
------------------------------------------------------------------ */
noinst_HEADERS = \
core_platform.h \
vki_unistd.h
+
+noinst_LIBRARIES = libplatform.a
+
+
+libplatform_a_SOURCES = \
+ ldt.c
#endif // __X86_LINUX_CORE_PLATFORM_H
+/* ---------------------------------------------------------------------
+ Exports of vg_ldt.c
+ ------------------------------------------------------------------ */
+
+// XXX: eventually all these should be x86-private, and not visible to the
+// core (except maybe do_useseg()?)
+
+/* Simulate the modify_ldt syscall. */
+extern Int VG_(sys_modify_ldt) ( ThreadId tid,
+ Int func, void* ptr, UInt bytecount );
+
+/* Simulate the {get,set}_thread_area syscalls. */
+extern Int VG_(sys_set_thread_area) ( ThreadId tid,
+ struct vki_modify_ldt_ldt_s* info );
+extern Int VG_(sys_get_thread_area) ( ThreadId tid,
+ struct vki_modify_ldt_ldt_s* info );
+
+/* Called from generated code. Given a segment selector and a virtual
+ address, return a linear address, and do limit checks too. */
+extern Addr VG_(do_useseg) ( UInt seg_selector, Addr virtual_addr );
+
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
/* The size of each LDT entry == sizeof(VgLdtEntry) */
#define VG_LDT_ENTRY_SIZE 8
-
/* Allocate and deallocate LDTs for threads. */
/* Create an LDT. If the parent_ldt is NULL, zero out the
extern void VG_(helper_cmpxchg8b);
/* ---------------------------------------------------------------------
- Exports of vg_ldt.c
+ LDT type
------------------------------------------------------------------ */
+// XXX: eventually this will be x86-private, not seen by the core(?)
+
/* This is the hardware-format for a segment descriptor, ie what the
x86 actually deals with. It is 8 bytes long. It's ugly. */
LdtEnt;
} VgLdtEntry;
-
/* ---------------------------------------------------------------------
Constants pertaining to the simulated CPU state, VG_(baseBlock),
which need to go here to avoid ugly circularities.