hanos操作系统手记-开始

来源:互联网 发布:批处理 单片机编译 编辑:程序博客网 时间:2024/04/30 03:30

终于将启动和转保护模式调通了。将汇编代码传到了csdn的代码库。后面的路还很长,一切在摸索当中。

下面需要写make文件,要用到连接器,编译器了。

暂定在Linux AS4平台开发。使用nasm,gld和gcc进行编译连接。

意识到资料收集的耗时费力,还是决定将整个过程记录下来。

在“缥缈云水间”的汇编版看到一些nasm的资料:(http://freecity.cnzju.net/cgi-bin/bbstdoc?board=AsmDos&start=159)

工具:

 GCC,  GNU Binutils, Newlib  GDB

GCC:标准C和C++,Java,Fortran等的编译器。自由开源软件。

GNU Binutils:二进制工具集,包括:

  • ld:GNU 连接器
  • as:GNU 汇编器
  • addr2line - Converts addresses into filenames and line numbers.
  • ar - A utility for creating, modifying and extracting from archives.
  • c+filt - Filter to demangle encoded C++ symbols.
  • gprof - Displays profiling information.
  • nlmconv - Converts object code into an NLM.
  • nm - Lists symbols from object files.
  • objcopy - Copys and translates object files.
  • objdump - Displays information from object files.
  • ranlib - Generates an index to the contents of an archive.
  • readelf - Displays information from any ELF format object file.
  • size - Lists the section sizes of an object or archive file.
  • strings - Lists printable strings from files.
  • strip - Discards symbols.
  • windres - A compiler for Windows resource files.

Newlib是用于嵌入式系统的C库

GDB是GNU的调试器。DDD 和 Insight 是其GUI版本。

用Source Navigator 看代码。

文档:

  • GCC 文档
  • GNU Binutils 文档
  • GDB 文档
  • 原创粉丝点击