If you use -xcode=pic32 for executables... what bad? things happen

The man page for CC is quite clear on why you should use pic13 or pic32 when you make .o's for dynamic libraries, however for abs 32/44/64 it just says: use one of those for executables and DONT use pic32 or pic13.

The short summary of why I am asking my question is the code/baseline I am working on currently uses -xcode=pic32 for all compilation of code for libraries AND executables, and it would be a pain to change it to do the "right" thing. The executables currently run... but is there a hidden problem here that may cause executables to crash sometimes or perhaps run slower?

Mordsith

Message was edited by:

Mordsith

[659 byte] By [Mordsitha] at [2007-11-26 21:46:02]
# 1

PIC code is less effiicient, which is why it is not the default mode. In PIC mode, accessing an address can require an additional instruction or two. That is why we recommend PIC code only for use in shared libraries, where it is necessary. (Code with non-relative addressing cannot be relocated, and thus cannot be shared.)

But the reduction in performance is not always measurable. You can try building the program both ways, and see whether there is a difference.

PIC vs non-PIC does not affect program behavior other than program size and execution speed.

clamage45a at 2007-7-10 3:35:20 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Tx for the information, very helpful!
Mordsitha at 2007-7-10 3:35:20 > top of Java-index,Development Tools,Solaris and Linux Development Tools...