32-bit PIC patch for m68k-pic-coff 2.7.2.3

When the compiler is called with -fPIC, it generates PIC code with 32-bit offsets. Without -fPIC, 16-bit offsets are generated. The diff is against gcc-2.7.2.3 with PIC patches applied. Both kinds of code can be mixed without any restriction. Since the code compiled with -fPIC is larger, it makes sence to compile only those files with -fPIC where large offsets are needed. There is no precompiled binary for the moment, so you have to obtain the gcc source and the original PIC patches from the uClinux CD or  http://www.uclinux.org.

 Download gcc-2.7.2.3-pic-32bit.diff here.
 The modified crt0.S is here. In addition, a module that contains only _cleanup(){} must be added as the last object file.



Tom Walsh has built a Redhat 6.2 RPM:

Hello,

 I have built a Redhat 6.2 RPM of Erwin Authried's PIC 32 bit patch for
gcc, it can be found at:
 http://openhardware.net/ez328simm/FtpFiles/uclinux-ez328simm/m68k-pic32-coff-gcc-2.7.2.3-2.i386.rpm
Note that the package name has been changed from m68k-pic-coff-gcc to
that of m68k-pic32-coff-gcc, the previous package is not needed.  You
should be able to remove the old m68k-pic-coff-gcc and install this one
without disruption to your development environ. Remember to get Erwin's
crt0.S, compile it into an obj (crt0.o) and replace the
/opt/uClinux/m68k-pic-coff/lib/crt0.o with the new one.

 I have successfully compilied my kernel, romdisk and user sources
without problems. Good work Erwin!

Regards,

TomW



This patch is released under the provisions of the GNU General Public License of the  Free Software Foundation.
Please send questions, problems and suggestions to  eauth@softsys.co.at.

Erwin Authried


ChangeLog

Mon Jul 31 11:28:52 MET 2000
        * The filename for the ld script was wrong in the patch, causing the patch to be rejected. Thanks to Tom Walsh who reported this error.

Tue Jun 27 18:34:40 MET 2000
        * The "const" patch has been removed because it doesn't work as expected with string constants. Contributions to solve this problem are welcome.

Thu Mar 23 10:32:28 MET 2000
        * added crt0.S
        * Place "const" declarations into data section (m68kpic.h)

Wed Jan 12 22:46:33 MET 2000
        * Modified uClinux-pic.ld to avoid linker error message with large text segment.