Skip to content

Instantly share code, notes, and snippets.

View nulldatamap's full-sized avatar

Nulldata nulldatamap

View GitHub Profile

My problem:

( 0x7cb6 as *const u8 ) == ( (&idtr) as *const u8 ) // false

Well, that's consequence. Let me explain.

First some information about the code. It's a part of my kernel ( the code that sets up the interrupt table to be specific. ). The target for the code is --target i686-unknown-linux-gnu and it's using --emit obj in order to link it with the bootloader at a later point.

let buf = &[0u,..16];
let bufw = StringWriter::new(buf);
match (&10,) {
(__arg0,) => {
#[inline]
#[allow(dead_code)]
static __STATIC_FMTSTR:
[::std::fmt::rt::Piece<'static>, ..1u]
=
[::std::fmt::rt::Argument(::std::fmt::rt::Argument{position:
bits 16
extern kmain
extern report_morestack
global start
global _abort
global idt_entries
section .text

In the linking phase of the kernel build ld returns with the following error:

rskernel.o: In function `kmain':
kernel.rs:(.text.kmain+0x7d): undefined reference to `ZN7failure5fail_20h663017d6c5d27101NWjE'

In the kernel.rs file the following code is provoking a call to core::failure::fail_:

provoke_fail_( 0/0 ); // 0/0 will call fail_ due to zero division

The core library is referenced via extern crate core; in kernel.rs.

package io.nulldata.protocols;
import io.nulldata.utils.Maybe;
import java.io.IOException;
import java.nio.ByteBuffer;
public class Test {
public static void register_packets() {
use VERSION_UINT;
use std::io::{IoResult, BufWriter};
use super::Packet;
use super::error::{NetError};
use super::id::{Idable};
pub struct Handshake {
magic : u32,
version : u32,
token : String
-- BoardApp.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module BoardApp ( BoardApp
, Board (..)

The Templator format

The Templator foramt is a format for generating source code files from a set of structured data. It's relatively flexible making it applicable for a large amount of different input data.

Contents:

  • API
  • Syntax
  • Semantics
  • Examples

The Templator format

The Templator foramt is a format for generating source code files from a set of structured data. It's relatively flexible making it applicable for a large amount of different input data.

Contents:

  • API

  • Syntax

  • Semantics

  • Examples

The Templator format

The Templator foramt is a format for generating source code files from a set of structured data. It's relatively flexible making it applicable for a large amount of different input data.

Contents:

  • API

  • Syntax

  • Semantics

  • Examples