Gunther Nikl wrote : > On Sat, Jan 14, 2006 at 02:21:20AM +0100, Philippe De Muyter wrote: > > For an embedded mmu-less m68k target, I would like to generate code > > that will always run at a fixed place in memory, thus not needing to be PIC, > > but that would access a data+bss segment that could be anywhere in memory, > > thus needing accesses to the data segment via %a5 and an offset table. > > > > 1. Does that possibility already exist in gcc (I did not find it) ? > > -msep-data currently does PI-text + PI-data. > > AFAICT, this doesn't exist within mainline GCC. The AmigaOS port (which > isn't part of the official sources) implements this scheme, either with > 16bit or 32bit displacements. The latter requires a 68020 or better. > Note, you need binutils support as well.
Where is that AmigaOS port availaible ? That seems to be an easier solution. > > > 2. If it does not exist, I plan to integrate it. > > - From which release or branch should I start ? > > I'd like to work on something that is stable except for my changes. > > You have to use current mainlines sources. > > > - How is it currently possible in the gcc internals to know if a > > SYMBOL_REF points to the .text or .rodata segments ? > > The AmigaOS port uses SYMBOL_REF_FLAG to record this information. I believe > SYMBOL_REF_FLAG is deprecated and there is a newer functionality to achieve > the same. > > Gunther > Thanks for your answer Philippe