This is the mail archive of the crossgcc@sources.redhat.com 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] |
I have some questions about GCC sections that I haven't encountered with other compilers before. This is for a statically linked embedded PowerPC system that uses newlib. I've already got startup code that works other compilers, so the only thing I think I should need to do is call __init() to make sure static constructors are run (ie, I don't want to call __eabi()). But there's a bunch of sections getting linked in that seem to deal with relocatable images, such as ".fixup", ".got2", etc. If I link statically can't I just discard these? I tried using the "-mno-relocatable" flag, but because newlib compiled everything as "-mrelocatable -mno-eabi", these libraries still bring in their own ".fixup" sections. (Is there a way to configure newlib to build non-relocatable libraries without patching the configured Makefiles?) I'm also unsure about the .got, .got1, and .got2 sections. I know some of these are in the ABI, but I've never seen them in practice with other compilers. Aren't these only needed for relocatable images also? (only .got2 has non-zero size, and I think that's only because of eabi.asm) Also, since the linker automatically puts in all the .debug* sections, do I have to explicitly mention them in the linker script? I ended up being forced to include a ".jcr" section for Java, because it's mentioned in crtbegin.o. Is there anyway to avoid this? Should I just roll my own static constructor init routine? Finally, just a simple question that I can't quite pin-down in the EABI docs, is .sbss2 a read-only or a writeable section? If it's writeable, then it's difficult to put .sdata2 in a read-only section of memory, but a read-only bss section sounds silly. Thanks for your time, Darin Johnson ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |