These are no longer used.

Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 Makefile                  |    3 +-
 arch/x86/jato_32.ld       |  199 ----------------------------------------
 arch/x86/jato_64.ld       |  220 ---------------------------------------------
 include/vm/fault-inject.h |    6 +-
 include/vm/natives.h      |   15 ---
 include/vm/stack-trace.h  |    4 +-
 vm/fault-inject.c         |    4 +-
 vm/jato.c                 |   32 ++++----
 vm/stack-trace.c          |    4 +-
 9 files changed, 26 insertions(+), 461 deletions(-)
 delete mode 100644 arch/x86/jato_32.ld
 delete mode 100644 arch/x86/jato_64.ld

diff --git a/Makefile b/Makefile
index 579afa6..4606f28 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,6 @@ endif
 export ARCH_CFLAGS
 
 ARCH_CONFIG=arch/$(ARCH)/include/arch/config$(ARCH_POSTFIX).h
-LINKER_SCRIPT=arch/$(ARCH)/jato$(ARCH_POSTFIX).ld
 
 # Make the build silent by default
 V =
@@ -209,7 +208,7 @@ arch/$(ARCH)/insn-selector.c: monoburg FORCE
 
 $(PROGRAM): monoburg $(CLASSPATH_CONFIG) compile $(RUNTIME_CLASSES)
        $(E) "  LD      " $@
-       $(Q) $(CC) -T $(LINKER_SCRIPT) $(DEFAULT_CFLAGS) $(CFLAGS) $(OBJS) -o 
$(PROGRAM) $(LIBS) $(DEFAULT_LIBS)
+       $(Q) $(CC) $(DEFAULT_CFLAGS) $(CFLAGS) $(OBJS) -o $(PROGRAM) $(LIBS) 
$(DEFAULT_LIBS)
 
 compile: $(OBJS)
 
diff --git a/arch/x86/jato_32.ld b/arch/x86/jato_32.ld
deleted file mode 100644
index 083ea62..0000000
--- a/arch/x86/jato_32.ld
+++ /dev/null
@@ -1,199 +0,0 @@
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  PROVIDE (__executable_start = 0x08048000); . = 0x08048000 + SIZEOF_HEADERS;
-  .interp         : { *(.interp) }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .hash           : { *(.hash) }
-  .gnu.hash       : { *(.gnu.hash) }
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
-  .rel.dyn        :
-    {
-      *(.rel.init)
-      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
-      *(.rel.fini)
-      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
-      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
-      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
-      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
-      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
-      *(.rel.ctors)
-      *(.rel.dtors)
-      *(.rel.got)
-      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
-    }
-  .rela.dyn       :
-    {
-      *(.rela.init)
-      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
-      *(.rela.fini)
-      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
-      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
-      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
-      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
-      *(.rela.ctors)
-      *(.rela.dtors)
-      *(.rela.got)
-      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
-    }
-  .rel.plt        : { *(.rel.plt) }
-  .rela.plt       : { *(.rela.plt) }
-  .init           :
-  {
-    KEEP (*(.init))
-  } =0x90909090
-  .plt            : { *(.plt) }
-  .text           :
-  {
-    *(.text .stub .text.* .gnu.linkonce.t.*)
-    KEEP (*(.text.*personality*))
-    /* .gnu.warning sections are handled specially by elf32.em.  */
-    *(.gnu.warning)
-  } =0x90909090
-  .fini           :
-  {
-    KEEP (*(.fini))
-  } =0x90909090
-  PROVIDE (__etext = .);
-  PROVIDE (_etext = .);
-  PROVIDE (etext = .);
-  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-  .rodata1        : { *(.rodata1) }
-  .eh_frame_hdr : { *(.eh_frame_hdr) }
-  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  */
-  . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & 
(CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), 
CONSTANT (COMMONPAGESIZE));
-  /* Exception handling  */
-  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-  /* Thread Local Storage sections  */
-  .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
-  .tbss                  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
-  .preinit_array     :
-  {
-    PROVIDE_HIDDEN (__preinit_array_start = .);
-    KEEP (*(.preinit_array))
-    PROVIDE_HIDDEN (__preinit_array_end = .);
-  }
-  .init_array     :
-  {
-     PROVIDE_HIDDEN (__init_array_start = .);
-     KEEP (*(SORT(.init_array.*)))
-     KEEP (*(.init_array))
-     PROVIDE_HIDDEN (__init_array_end = .);
-  }
-  .fini_array     :
-  {
-    PROVIDE_HIDDEN (__fini_array_start = .);
-    KEEP (*(.fini_array))
-    KEEP (*(SORT(.fini_array.*)))
-    PROVIDE_HIDDEN (__fini_array_end = .);
-  }
-  .ctors          :
-  {
-    /* gcc uses crtbegin.o to find the start of
-       the constructors, so we make sure it is
-       first.  Because this is a wildcard, it
-       doesn't matter if the user does not
-       actually link against crtbegin.o; the
-       linker won't look for a file to match a
-       wildcard.  The wildcard also means that it
-       doesn't matter which directory crtbegin.o
-       is in.  */
-    KEEP (*crtbegin.o(.ctors))
-    KEEP (*crtbegin?.o(.ctors))
-    /* We don't want to include the .ctor section from
-       the crtend.o file until after the sorted ctors.
-       The .ctor section from the crtend file contains the
-       end of ctors marker and it must be last */
-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
-    KEEP (*(SORT(.ctors.*)))
-    KEEP (*(.ctors))
-  }
-  .dtors          :
-  {
-    KEEP (*crtbegin.o(.dtors))
-    KEEP (*crtbegin?.o(.dtors))
-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
-    KEEP (*(SORT(.dtors.*)))
-    KEEP (*(.dtors))
-  }
-  .jcr            : { KEEP (*(.jcr)) }
-  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) 
*(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
-  .dynamic        : { *(.dynamic) }
-  .got            : { *(.got) }
-  . = DATA_SEGMENT_RELRO_END (12, .);
-  .got.plt        : { *(.got.plt) }
-  .data           :
-  {
-    *(.data .data.* .gnu.linkonce.d.*)
-    KEEP (*(.gnu.linkonce.d.*personality*))
-    SORT(CONSTRUCTORS)
-  }
-  .data1          : { *(.data1) }
-  _edata = .; PROVIDE (edata = .);
-  __vm_native_start = .;
-  .vm_native      : { *(.vm_native) }
-  __vm_native_end = .;
-  __bss_start = .;
-  .bss            :
-  {
-   *(.dynbss)
-   *(.bss .bss.* .gnu.linkonce.b.*)
-   *(COMMON)
-   /* Align here to ensure that the .bss section occupies space up to
-      _end.  Align after .bss to ensure correct alignment even if the
-      .bss section disappears because there are no input sections.
-      FIXME: Why do we need it? When there is no .bss section, we don't
-      pad the .data section.  */
-   . = ALIGN(. != 0 ? 32 / 8 : 1);
-  }
-  . = ALIGN(32 / 8);
-  . = ALIGN(32 / 8);
-  _end = .; PROVIDE (end = .);
-  . = DATA_SEGMENT_END (.);
-  /* Stabs debugging sections.  */
-  .stab          0 : { *(.stab) }
-  .stabstr       0 : { *(.stabstr) }
-  .stab.excl     0 : { *(.stab.excl) }
-  .stab.exclstr  0 : { *(.stab.exclstr) }
-  .stab.index    0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment       0 : { *(.comment) }
-  /* DWARF debug sections.
-     Symbols in the DWARF debugging sections are relative to the beginning
-     of the section so we begin them at 0.  */
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-  /* DWARF 3 */
-  .debug_pubtypes 0 : { *(.debug_pubtypes) }
-  .debug_ranges   0 : { *(.debug_ranges) }
-  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
-  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
-}
diff --git a/arch/x86/jato_64.ld b/arch/x86/jato_64.ld
deleted file mode 100644
index 78d1087..0000000
--- a/arch/x86/jato_64.ld
+++ /dev/null
@@ -1,220 +0,0 @@
-SECTIONS
-{
-  /* Read-only sections, merged into text segment: */
-  PROVIDE (__executable_start = 0x400000); . = 0x400000 + SIZEOF_HEADERS;
-  .interp         : { *(.interp) }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .hash           : { *(.hash) }
-  .gnu.hash       : { *(.gnu.hash) }
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
-  .rel.dyn        :
-    {
-      *(.rel.init)
-      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
-      *(.rel.fini)
-      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
-      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
-      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
-      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
-      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
-      *(.rel.ctors)
-      *(.rel.dtors)
-      *(.rel.got)
-      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
-      *(.rel.ldata .rel.ldata.* .rel.gnu.linkonce.l.*)
-      *(.rel.lbss .rel.lbss.* .rel.gnu.linkonce.lb.*)
-      *(.rel.lrodata .rel.lrodata.* .rel.gnu.linkonce.lr.*)
-    }
-  .rela.dyn       :
-    {
-      *(.rela.init)
-      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
-      *(.rela.fini)
-      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
-      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
-      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
-      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
-      *(.rela.ctors)
-      *(.rela.dtors)
-      *(.rela.got)
-      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
-      *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
-      *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
-      *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
-    }
-  .rel.plt        : { *(.rel.plt) }
-  .rela.plt       : { *(.rela.plt) }
-  .init           :
-  {
-    KEEP (*(.init))
-  } =0x90909090
-  .plt            : { *(.plt) }
-  .text           :
-  {
-    *(.text .stub .text.* .gnu.linkonce.t.*)
-    KEEP (*(.text.*personality*))
-    /* .gnu.warning sections are handled specially by elf32.em.  */
-    *(.gnu.warning)
-  } =0x90909090
-  .fini           :
-  {
-    KEEP (*(.fini))
-  } =0x90909090
-  PROVIDE (__etext = .);
-  PROVIDE (_etext = .);
-  PROVIDE (etext = .);
-  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-  .rodata1        : { *(.rodata1) }
-  .eh_frame_hdr : { *(.eh_frame_hdr) }
-  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  */
-  . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & 
(CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), 
CONSTANT (COMMONPAGESIZE));
-  /* Exception handling  */
-  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
-  /* Thread Local Storage sections  */
-  .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
-  .tbss                  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
-  .preinit_array     :
-  {
-    PROVIDE_HIDDEN (__preinit_array_start = .);
-    KEEP (*(.preinit_array))
-    PROVIDE_HIDDEN (__preinit_array_end = .);
-  }
-  .init_array     :
-  {
-     PROVIDE_HIDDEN (__init_array_start = .);
-     KEEP (*(SORT(.init_array.*)))
-     KEEP (*(.init_array))
-     PROVIDE_HIDDEN (__init_array_end = .);
-  }
-  .fini_array     :
-  {
-    PROVIDE_HIDDEN (__fini_array_start = .);
-    KEEP (*(.fini_array))
-    KEEP (*(SORT(.fini_array.*)))
-    PROVIDE_HIDDEN (__fini_array_end = .);
-  }
-  .ctors          :
-  {
-    /* gcc uses crtbegin.o to find the start of
-       the constructors, so we make sure it is
-       first.  Because this is a wildcard, it
-       doesn't matter if the user does not
-       actually link against crtbegin.o; the
-       linker won't look for a file to match a
-       wildcard.  The wildcard also means that it
-       doesn't matter which directory crtbegin.o
-       is in.  */
-    KEEP (*crtbegin.o(.ctors))
-    KEEP (*crtbegin?.o(.ctors))
-    /* We don't want to include the .ctor section from
-       the crtend.o file until after the sorted ctors.
-       The .ctor section from the crtend file contains the
-       end of ctors marker and it must be last */
-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
-    KEEP (*(SORT(.ctors.*)))
-    KEEP (*(.ctors))
-  }
-  .dtors          :
-  {
-    KEEP (*crtbegin.o(.dtors))
-    KEEP (*crtbegin?.o(.dtors))
-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
-    KEEP (*(SORT(.dtors.*)))
-    KEEP (*(.dtors))
-  }
-  .jcr            : { KEEP (*(.jcr)) }
-  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) 
*(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
-  .dynamic        : { *(.dynamic) }
-  .got            : { *(.got) }
-  . = DATA_SEGMENT_RELRO_END (24, .);
-  .got.plt        : { *(.got.plt) }
-  .data           :
-  {
-    *(.data .data.* .gnu.linkonce.d.*)
-    KEEP (*(.gnu.linkonce.d.*personality*))
-    SORT(CONSTRUCTORS)
-  }
-  .data1          : { *(.data1) }
-  _edata = .; PROVIDE (edata = .);
-  __vm_native_start = .;
-  .vm_native      : { *(.vm_native) }
-  __vm_native_end = .;
-  __bss_start = .;
-  .bss            :
-  {
-   *(.dynbss)
-   *(.bss .bss.* .gnu.linkonce.b.*)
-   *(COMMON)
-   /* Align here to ensure that the .bss section occupies space up to
-      _end.  Align after .bss to ensure correct alignment even if the
-      .bss section disappears because there are no input sections.
-      FIXME: Why do we need it? When there is no .bss section, we don't
-      pad the .data section.  */
-   . = ALIGN(. != 0 ? 64 / 8 : 1);
-  }
-  .lbss   :
-  {
-    *(.dynlbss)
-    *(.lbss .lbss.* .gnu.linkonce.lb.*)
-    *(LARGE_COMMON)
-  }
-  . = ALIGN(64 / 8);
-  .lrodata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 
1)) :
-  {
-    *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
-  }
-  .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
-  {
-    *(.ldata .ldata.* .gnu.linkonce.l.*)
-    . = ALIGN(. != 0 ? 64 / 8 : 1);
-  }
-  . = ALIGN(64 / 8);
-  _end = .; PROVIDE (end = .);
-  . = DATA_SEGMENT_END (.);
-  /* Stabs debugging sections.  */
-  .stab          0 : { *(.stab) }
-  .stabstr       0 : { *(.stabstr) }
-  .stab.excl     0 : { *(.stab.excl) }
-  .stab.exclstr  0 : { *(.stab.exclstr) }
-  .stab.index    0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment       0 : { *(.comment) }
-  /* DWARF debug sections.
-     Symbols in the DWARF debugging sections are relative to the beginning
-     of the section so we begin them at 0.  */
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-  /* DWARF 3 */
-  .debug_pubtypes 0 : { *(.debug_pubtypes) }
-  .debug_ranges   0 : { *(.debug_ranges) }
-  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
-  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
-}
diff --git a/include/vm/fault-inject.h b/include/vm/fault-inject.h
index 33d58fe..0567f0a 100644
--- a/include/vm/fault-inject.h
+++ b/include/vm/fault-inject.h
@@ -15,9 +15,9 @@ enum vm_fault {
 bool vm_fault_enabled(enum vm_fault fault);
 struct vm_object *vm_fault_arg(enum vm_fault fault);
 
-void __vm_native native_vm_enable_fault(enum vm_fault fault,
-                                       struct vm_object *arg);
+void native_vm_enable_fault(enum vm_fault fault,
+                           struct vm_object *arg);
 
-void __vm_native native_vm_disable_fault(enum vm_fault fault);
+void native_vm_disable_fault(enum vm_fault fault);
 
 #endif
diff --git a/include/vm/natives.h b/include/vm/natives.h
index 0013362..5491812 100644
--- a/include/vm/natives.h
+++ b/include/vm/natives.h
@@ -3,21 +3,6 @@
 
 #include <stdbool.h>
 
-/*
- * All VM native functions are placed in a separate section
- * so that they can be easily distinguished by stack traversal
- * functions.
- */
-#define __vm_native __attribute__ ((section(".vm_native")))
-
-extern char __vm_native_start;
-extern char __vm_native_end;
-
-static inline bool is_vm_native(unsigned long addr) {
-       return addr >= (unsigned long)&__vm_native_start &&
-               addr < (unsigned long)&__vm_native_end;
-}
-
 struct vm_native {
        const char *    class_name;
        const char *    method_name;
diff --git a/include/vm/stack-trace.h b/include/vm/stack-trace.h
index 504c450..925cdce 100644
--- a/include/vm/stack-trace.h
+++ b/include/vm/stack-trace.h
@@ -134,8 +134,8 @@ int skip_frames_from_class(struct stack_trace_elem *elem, 
struct vm_class *class
 int get_stack_trace_depth(struct stack_trace_elem *elem);
 struct vm_object *get_stack_trace(void);
 struct vm_object *get_stack_trace_from_ctx(void *ctx);
-struct vm_object * __vm_native native_vmthrowable_fill_in_stack_trace(struct 
vm_object *);
-struct vm_object * __vm_native native_vmthrowable_get_stack_trace(struct 
vm_object *, struct vm_object *);
+struct vm_object *native_vmthrowable_fill_in_stack_trace(struct vm_object *);
+struct vm_object *native_vmthrowable_get_stack_trace(struct vm_object *, 
struct vm_object *);
 
 bool called_from_jit_trampoline(struct native_stack_frame *frame);
 void vm_print_exception(struct vm_object *exception);
diff --git a/vm/fault-inject.c b/vm/fault-inject.c
index 87cf3e7..149ecb0 100644
--- a/vm/fault-inject.c
+++ b/vm/fault-inject.c
@@ -50,7 +50,7 @@ struct vm_object *vm_fault_arg(enum vm_fault fault)
        return vm_fault_entries[fault].arg;
 }
 
-void __vm_native native_vm_enable_fault(enum vm_fault fault,
+void native_vm_enable_fault(enum vm_fault fault,
                                        struct vm_object *arg)
 {
        if (fault < 0 || fault >= VM_FAULT_MAX)
@@ -60,7 +60,7 @@ void __vm_native native_vm_enable_fault(enum vm_fault fault,
        vm_fault_entries[fault].arg = arg;
 }
 
-void __vm_native native_vm_disable_fault(enum vm_fault fault)
+void native_vm_disable_fault(enum vm_fault fault)
 {
        if (fault < 0 || fault >= VM_FAULT_MAX)
                return;
diff --git a/vm/jato.c b/vm/jato.c
index e3163bd..93f35bc 100644
--- a/vm/jato.c
+++ b/vm/jato.c
@@ -70,7 +70,7 @@
 static bool perf_enabled;
 char *exe_name;
 
-static struct vm_object *__vm_native native_vmstackwalker_getclasscontext(void)
+static struct vm_object *native_vmstackwalker_getclasscontext(void)
 {
        struct stack_trace_elem st_elem;
        struct compilation_unit *cu;
@@ -122,7 +122,7 @@ static const struct system_properties_entry 
system_properties[] = {
        { "line.separator", "\n" },
 };
 
-static void __vm_native native_vmsystemproperties_preinit(struct vm_object *p)
+static void native_vmsystemproperties_preinit(struct vm_object *p)
 {
        char *s;
 
@@ -139,13 +139,13 @@ static void __vm_native 
native_vmsystemproperties_preinit(struct vm_object *p)
        }
 }
 
-static void __vm_native native_vmruntime_exit(int status)
+static void native_vmruntime_exit(int status)
 {
        /* XXX: exit gracefully */
        exit(status);
 }
 
-static struct vm_object *__vm_native
+static struct vm_object *
 native_vmruntime_maplibraryname(struct vm_object *name)
 {
        struct vm_object *result;
@@ -181,7 +181,7 @@ native_vmruntime_maplibraryname(struct vm_object *name)
        return result;
 }
 
-static int __vm_native
+static int
 native_vmruntime_native_load(struct vm_object *name,
                             struct vm_object *classloader)
 {
@@ -211,7 +211,7 @@ native_vmruntime_native_load(struct vm_object *name,
        return result == 0;
 }
 
-static void __vm_native native_vmruntime_println(struct vm_object *message)
+static void native_vmruntime_println(struct vm_object *message)
 {
        char *cstr = vm_string_to_cstr(message);
 
@@ -221,7 +221,7 @@ static void __vm_native native_vmruntime_println(struct 
vm_object *message)
        free(cstr);
 }
 
-static void __vm_native
+static void
 native_vmsystem_arraycopy(struct vm_object *src, int src_start,
                          struct vm_object *dest, int dest_start, int len)
 {
@@ -272,12 +272,12 @@ native_vmsystem_arraycopy(struct vm_object *src, int 
src_start,
        throw_from_native(sizeof(int) * 3 + sizeof(struct vm_object*) * 2);
 }
 
-static int32_t __vm_native native_vmsystem_identityhashcode(struct vm_object 
*obj)
+static int32_t native_vmsystem_identityhashcode(struct vm_object *obj)
 {
        return (int32_t) obj;
 }
 
-static struct vm_object * __vm_native
+static struct vm_object *
 native_vmobject_clone(struct vm_object *object)
 {
        if (!object) {
@@ -289,7 +289,7 @@ native_vmobject_clone(struct vm_object *object)
        return vm_object_clone(object);
 }
 
-static struct vm_object * __vm_native
+static struct vm_object *
 native_vmobject_getclass(struct vm_object *object)
 {
        if (!object) {
@@ -303,13 +303,13 @@ native_vmobject_getclass(struct vm_object *object)
        return object->class->object;
 }
 
-static struct vm_object * __vm_native
+static struct vm_object *
 native_vmclass_getclassloader(struct vm_object *object)
 {
        if (!object) {
                signal_new_exception(vm_java_lang_NullPointerException, NULL);
                throw_from_native(sizeof object);
-               return 0;
+               return NULL;
        }
 
        struct vm_class *class = vm_class_get_class_from_class_object(object);
@@ -319,7 +319,7 @@ native_vmclass_getclassloader(struct vm_object *object)
        return NULL;
 }
 
-static struct vm_object * __vm_native
+static struct vm_object *
 native_vmclass_getname(struct vm_object *object)
 {
        struct vm_class *class;
@@ -330,7 +330,7 @@ native_vmclass_getname(struct vm_object *object)
        return vm_object_alloc_string_from_c(class->name);
 }
 
-static int32_t __vm_native
+static int32_t
 native_vmclass_isprimitive(struct vm_object *object)
 {
        if (!object) {
@@ -346,7 +346,7 @@ native_vmclass_isprimitive(struct vm_object *object)
        return class->kind == VM_CLASS_KIND_PRIMITIVE;
 }
 
-static struct vm_object * __vm_native
+static struct vm_object *
 native_vmclassloader_getprimitiveclass(int type)
 {
        char primitive_class_name[] = { "X" };
@@ -365,7 +365,7 @@ native_vmclassloader_getprimitiveclass(int type)
        return class->object;
 }
 
-static int __vm_native
+static int
 native_vmfile_is_directory(struct vm_object *dirpath)
 {
        char *dirpath_str;
diff --git a/vm/stack-trace.c b/vm/stack-trace.c
index fe8e418..3aba177 100644
--- a/vm/stack-trace.c
+++ b/vm/stack-trace.c
@@ -538,7 +538,7 @@ struct vm_object *get_stack_trace()
        return convert_intermediate_stack_trace(intermediate);
 }
 
-struct vm_object * __vm_native
+struct vm_object *
 native_vmthrowable_fill_in_stack_trace(struct vm_object *throwable)
 {
        struct vm_object *vmstate;
@@ -557,7 +557,7 @@ native_vmthrowable_fill_in_stack_trace(struct vm_object 
*throwable)
        return vmstate;
 }
 
-struct vm_object * __vm_native
+struct vm_object *
 native_vmthrowable_get_stack_trace(struct vm_object *this,
                                   struct vm_object *throwable)
 {
-- 
1.6.0.6


------------------------------------------------------------------------------
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to