linux
文章平均质量分 76
alta_wu
这个作者很懒,什么都没留下…
展开
-
gethostbyname() -- 用域名或主机名获取IP地址
#include #include struct hostent *gethostbyname(const char *name); 这个函数的传入值是域名或者主机名,例如"www.google.cn"等等。传出值,是一个hostent的结构。如果函数调用失败,将返回NULL。 struct hostent { cha转载 2012-02-22 16:25:23 · 395 阅读 · 0 评论 -
《专业嵌入式软件开发》笔记-第4章
第4章 gcc 4.0.1 linux非实时操作系统包括RedHat Linux、Fedora、Ubuntu、CentOS等;Linux实时操作系统包括Monta Vista Linux、WindRiver Linux(VxWorks,已被Intel收购)、RTLinux等。4.1.1 交叉编译器 4.2.1 gcc -E file.c >file.pre.c 得到预处理过的源文件原创 2012-02-18 00:20:50 · 653 阅读 · 0 评论 -
《专业嵌入式软件开发》笔记-第5章addr2line
binutils工具集5.1 addr2line指令地址翻译器,编译时加上-g选项,addr2line才有作用main.c#include void foo(void){ printf("The address of foo() is %p.\n", foo);}int main(void){ foo(); return 0;}原创 2012-02-18 20:38:14 · 955 阅读 · 0 评论 -
程序内存分布
在多任务操作系统中的每一个进程都运行在一个属于它自己的内存沙盘中。这个沙盘就是虚拟地址空间(virtual address space),在32位模式下它总是一个4GB的内存地址块。这些虚拟地址通过页表(page table)映射到物理内存,页表由操作系统维护并被处理器引用。每一个进程拥有一套属于它自己的页表,但是还有一个隐情。只要虚拟地址被使能,那么它就会作用于这台机器上运行的所有软件,转载 2012-02-17 16:35:54 · 327 阅读 · 0 评论 -
《专业嵌入式软件开发》笔记-第5章ar、nm、objdump、objcopy、ranlib、size、strings、strip
ar,静态库生成器Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [member-name] [count] archive-file file... ar -M [ commands: d - delete file(s) from the archive m[原创 2012-02-19 00:36:22 · 1895 阅读 · 1 评论 -
uboot代码下载
所有版本的u-boot源代码压缩包都可以在ftp://ftp.denx.de/pub/u-boot/下载。关于u-boot源代码的信息,看http://www.denx.de/wiki/U-Boot/SourceCodeU-Boot Source CodeThe current source code is available through the git repos原创 2012-04-07 22:04:40 · 648 阅读 · 0 评论 -
vim editor
vim tutorial http://www.openvim.com/tutorial.htmlvim小游戏 vim adventure 此游戏不注册只能玩三关,level之后需要注册。可打印出来备忘的 vim cheat sheet for programmers原创 2012-12-19 10:23:29 · 440 阅读 · 0 评论