compiling for my os
Posted: Sun Jan 17, 2010 3:42 pm
Ok, I want to start writing all the programs I need to get my os running (usable. I came across some problems and don´t want to boring you with details how my os works.
I need executable (elf) files which can´t be linked dynamically to libraries. I can link statically or insert the needed files from the libraries (I think I will use the latter). This seems to be no problem at the moment, but I get problems when it comes to creating shared libraries and executable files which need those shared libraries.
I have to say that I´ve never written a program which used shared libraries and compiled it with gcc. So I don´t know how to do that and how it works in detail. I know that the needed libraries stand somewhere in the elf file and I need to load them. I think that I will get the whole linking stuff working (when I loaded the files). As I´ve read the wiki article on porting newlib and creating a tool-chain for my os I read something that it is important where (as of which path) the library is built. So why is that so?
I wanted it (and thought that it is) that way, that in the elf file stand some libraries that I load from somewhere and I then resolve all the needed symbols.
I need executable (elf) files which can´t be linked dynamically to libraries. I can link statically or insert the needed files from the libraries (I think I will use the latter). This seems to be no problem at the moment, but I get problems when it comes to creating shared libraries and executable files which need those shared libraries.
I have to say that I´ve never written a program which used shared libraries and compiled it with gcc. So I don´t know how to do that and how it works in detail. I know that the needed libraries stand somewhere in the elf file and I need to load them. I think that I will get the whole linking stuff working (when I loaded the files). As I´ve read the wiki article on porting newlib and creating a tool-chain for my os I read something that it is important where (as of which path) the library is built. So why is that so?
I wanted it (and thought that it is) that way, that in the elf file stand some libraries that I load from somewhere and I then resolve all the needed symbols.