I have modified PIC gcc so that constant declarations are put into the
data section instead of the text section. Having constant data in the
text section would propably be better, but I think that's difficult to do.
The diff is available at http://www.home.at/uclinux, it is merged with the
PIC 32bit patches. Oh, and don't forget to recompile everything
containing const declarations. The modifications are not tested.
Victor Prupis[SMTP:email@example.com] wrote:
> On Wed, 22 Mar 2000, Erwin Authried wrote:
> > I doubt that this works. The value for the code origin has no affect on the
> > generated code, because the code section is not location dependent.
> > In this case, it supresses the linker error message, but it doesn't solve
> > the wrong adressing in main.c. data and text section are still at different
> > adresses. The right place to fix this is in the compiler.
> > -Erwin
> > Hungchen[SMTP:firstname.lastname@example.org] wrote:
> > > Hi Victor
> Sorry I dind't have a chance to reply. Erwin is absolutely correct - the
> compiler must be fixed. Meanwhile, just to warn the crowd: libc does use
> global const variables. In fact, I discovered the bug in an attempt to
> link mktime.o (which is disabled in uClinux distribution, how strange).
> The only way out was to zap the 'const' :(
> Victor [This space intentionally left right]
This message resent by the email@example.com list server http://www.uClinux.com/
This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:35 EST