为OS定制gcc编译器 [英] customize gcc compiler for os

查看:125
本文介绍了为OS定制gcc编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们
我正在编写一个小型OS,如何为我的OS和
自定义gcc编译器 在我的OS中使用它?使其创建某种可执行文件(或库).

我个人对GCC并不了解,所以您可能将不得不很大程度上依赖于Google Monster.


GCC生成目标文件,它是链接产生最终可执行文件的实用程序.发明一种新的可执行格式本身就是一项艰巨的任务,为什么不重用现有的可执行格式呢?

这是您应调查的链接:
OSKit项目 [ 解决方案

I doubt if you have the time/skills to modify the compiler itself, but you can change the switches used to compile your application (to make it create a certain kind of executable (or library).

I don''t personally know anything about GCC, so you''re probably going to have to rely largely on the google monster.


GCC produces object files, it''s the linking utility that produces the final executable. Inventing a new executable format is a dauting task on it''s own, why not reuse an existing one?

Here is a link you should investigate:
The OSKit Project[^] - played around with it years ago, didn''t amount to much, but it WAS FUN!

Regards
Espen Harlinn


这篇关于为OS定制gcc编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆