Peter Naulls wrote:
Lee Noar wrote:

I assume you mean -fpic rather than -fPIC as the latter *is* required and used for building shared libraries for RISC OS (I'd be surprised if the documentation said otherwise ;-). -fpic generates the original PLT entries which at the time I had a use for, however, that is no longer the case. The output of -fpic could be made the same as -fPIC to prevent any mix ups.

It does say this - look at lines 114+ of !ReadMe - as opposed the the
earlier paragraph around line 45.

Line 45+ refers to shared libraries while line 114+ refers to executables. The only way the compiler knows whether it is dealing with library code or executable code is through the use of -fPIC so making it do nothing for executable code isn't really an option.

Using -fPIC on an executable would add PIC register loading code to any function using global data and attempt to access such data via the PIC register. It may be possible to make this work (if it doesn't already - I've never tried), but I always assumed that the likely impact on performance would be undesirable. OTOH, I'll have a look to see if it can be made to work if only to lift the restriction of -fPIC on executables and bring it into line with other platforms.

Lee.

_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to