# -*- mode: python; coding: utf-8; -*- # # Codezero -- a microkernel for embedded systems. # # Copyright © 2009 B Labs Ltd import os, sys, shelve # Convert address from python literal to numeric value def address_remove_literal(address): value = hex(int(address, 16) - 0xf0000000) if value[-1] in ['l', 'L']: value = value[:-1] return value ksym_header = \ ''' /* * %s autogenerated from %s. * * This file is included by the loader sources so that any * kernel symbol address can be known in advance and stopped * at by debuggers before virtual memory is enabled. */ ''' symbol_section = \ ''' .section .text .align 4 .global %s .type %s, function .equ %s, %s '''