Re: ARM Overview Revert
Posted: Tue Feb 25, 2014 11:46 am
Pancakes: User-space hosted libgcc for linux will depend on stuff from the standard library, in this case you should provide most all these functions anyway (memset, memcpy, memmove and memcmp are all required unconditionally by gcc according to the documentation, even if -ffreestanding) and the rest are trivial to add.
Next, you can't and shouldn't use linux libgcc in your custom OS! (arm-linux-gnueabi is not a suitable target just like x86_64-linux-gnu isn't a suitable target for osdev, besides Linux). You need a cross-libgcc as well. The standard cross-compiler tutorial covers this and it is really simple. See Bare Bones on how to use the cross-libgcc, it's really as simple as just passing -lgcc when you link with your compiler (rather than ld). The cross-libgcc will be static unless you explicitly added shared library support to your cross-toolchain.
Note also that error means you are attempting to link in glibc into your system! That's likely very wrong. I suppose I will have to look at your tutorial carefully to see what is going on.
libgcc isn't fragile as such, you simply need to link in the correct libgcc. The fragile part is that if you clone libgcc, you will not stay in sync with the upstream libgcc and this is the fragile part.
I suppose I should do a libgcc FAQ with a better overview.
Next, you can't and shouldn't use linux libgcc in your custom OS! (arm-linux-gnueabi is not a suitable target just like x86_64-linux-gnu isn't a suitable target for osdev, besides Linux). You need a cross-libgcc as well. The standard cross-compiler tutorial covers this and it is really simple. See Bare Bones on how to use the cross-libgcc, it's really as simple as just passing -lgcc when you link with your compiler (rather than ld). The cross-libgcc will be static unless you explicitly added shared library support to your cross-toolchain.
Note also that error means you are attempting to link in glibc into your system! That's likely very wrong. I suppose I will have to look at your tutorial carefully to see what is going on.
libgcc isn't fragile as such, you simply need to link in the correct libgcc. The fragile part is that if you clone libgcc, you will not stay in sync with the upstream libgcc and this is the fragile part.
I suppose I should do a libgcc FAQ with a better overview.