This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Opinions requested


On 8/22/2010 11:43 PM, Yann E. MORIN wrote:
Johannes, Harold, All,
And what Harold is doing is having his own support library (which offers a
non-POSIX API), and links his programs against that. That's definitely a
kind of baremetal, just using his library instead of newlib.


That's the idea (I am the "colleague" in question ;))


And still doing some research (I'm no expert in cross compiler stuffs, but working on it)

So I have a question here for you all..

Is there a way to entice GCC to build a NON-PIC libgcc ? I'm already building it static.

I need libgcc basically because my target system is 32 bit so it needs libgcc to do 64 bit stuff (came upon it trying to divide & modulo on a "long long int" which brings me to __divdi3 and __moddi3).

What I do right now, is I read ELF relocatable objects and turn them into a file my native loader can understand..

However, the loader on my target system can't do relative relocations (which is required for the GOT) - so I'm basically stuck with adding a "sed" to my cross building script to remove all the -fPIC in gcc/libgcc.mvars in my build directory before I build libgcc itself - and that's.. Ugly !

note that I then re-split the libgcc.a archive and send the converted ELF relocatables to my target system so they are available for the actual linking.

Eventually, the problem may be moot. Because I'm also working on an ELF loader for that target system, but for obvious reasons, the ELF loader itself would need to be linkedited with the native loader. So I would have to make sure it doesn't have libgcc requirements.

--Ivan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]