Warning: setting incorrect section attributes for .rodata.sc

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Warning: setting incorrect section attributes for .rodata.sc

Post by sakya »

Hi! :)

I receive this warning when compiling a project:

Code: Select all

Warning: setting incorrect section attributes for .rodata.sceModuleInfo
This is how module info is set:

Code: Select all

#define VERS    2
#define REVS    52
PSP_MODULE_INFO("StacklessPython", 0, VERS, REVS);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER|PSP_THREAD_ATTR_VFPU);
PSP_HEAP_SIZE_KB(-1024);    /* Leave 1024k to OS, rest to app */
PSP_MAIN_THREAD_STACK_SIZE_KB(64);
I updated the pspsdk, but the warning is still present.
Do someone knows what this warning means and what can cause it?
Many thanks

ciaooo
sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Re: Warning: setting incorrect section attributes for .rodat

Post by ab5000 »

can you post your makefile and the .S file causing the error?

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Sure:

Code: Select all

# Default build&#58; psp2d, pspnet, pspsnd
# If using OSLIB disable PSP2D and PSPSND
# If using OSLIB MOD disable PSP2D and PSPSND, enable OSLIB and OSLIB_MOD
#
# The exception handler is useful only while developing and testing the interpreter.
# To enable it set to 1 WITH_EXPCETION_HANDLER, build the prx in exceptionhandler\prx and copy
# exception.prx to the PSP with the Stackless EBOOT.PBP

WITH_PSP2D = 0
WITH_PSPSND = 0
WITH_PSPNET = 1
WITH_OSLIB = 1
WITH_OSLIB_MOD = 1
WITH_SQLITE = 0
WITH_PSPOGG = 0
WITH_PSPMP3 = 1
WITH_EXPCETION_HANDLER = 1
WITH_SSL = 0     # SSL not working yet

include Makefile.base

Code: Select all

TARGET = StacklessPSP
BUILD_PRX = 1
PSP_LARGE_MEMORY = 1
PSP_FW_VERSION = 371
RELEASE_NAME = StacklessPSP
RELEASE_VERSION = 2.5.2
RELEASE_DIRECTORY = ../../$&#40;RELEASE_NAME&#41;-$&#40;RELEASE_VERSION&#41;

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Stackless PyPSP 2.5.2
PSP_EBOOT_ICON = icon_slp252.png
#PSP_EBOOT_UNKPNG = pic0.png
#PSP_EBOOT_PIC1 = pic1.png
#PSP_EBOOT_SND0 = snd0.at3

MODULES_STATIC = \
	Modules/config.o \
	Modules/pspos.o \
	../Modules/main.o \
	../Modules/getbuildinfo.o \
	../Modules/gcmodule.o \
	../Modules/getpath.o \
	../Modules/timemodule.o \
	../Modules/mathmodule.o \
	../Modules/_struct.o \
	../Modules/binascii.o \
	../Modules/_randommodule.o \
	../Modules/_sre.o \
	../Modules/cStringIO.o \
	../Modules/_typesmodule.o \
	../Modules/errnomodule.o \
	../Modules/threadmodule.o \
	../Modules/collectionsmodule.o \
	../Modules/md5module.o \
	../Modules/md5.o \
	../Modules/socketmodule.o \
	../Modules/selectmodule.o \
	../Modules/pspsocket.o \
	../Modules/zipimport.o \
	../Modules/shamodule.o \
	../Modules/sha256module.o \
	../Modules/sha512module.o \
	../Modules/_codecsmodule.o \
	../Modules/datetimemodule.o \
	../Modules/_bisectmodule.o \
	../Modules/_csv.o \
	../Modules/_heapqmodule.o \
	../Modules/_weakref.o \
	../Modules/arraymodule.o \
	../Modules/audioop.o \
	../Modules/cPickle.o \
	../Modules/cmathmodule.o \
	../Modules/itertoolsmodule.o \
	../Modules/operator.o \
	../Modules/parsermodule.o \
	../Modules/symtablemodule.o \
	../Modules/timingmodule.o \
	../Modules/unicodedata.o \
	../Modules/zlibmodule.o \
    ../Modules/stropmodule.o \
	../Modules/_localemodule.o \
	../Modules/pyexpat.o \
	../Modules/expat/xmlparse.o \
	../Modules/expat/xmlrole.o \
	../Modules/expat/xmltok.o \
	../Modules/_elementtree.o \
	../Modules/_functoolsmodule.o \
	../Modules/bz2module.o \

OBJECTS_PYTHON = \
    ../Python/ast.o \
    ../Python/Python-ast.o \
    ../Python/asdl.o \
    ../Python/atof.o \
    ../Python/pyarena.o \
	../Python/traceback.o \
	../Python/sysmodule.o \
	../Python/structmember.o \
	../Python/strdup.o \
	../Python/sigcheck.o \
	../Python/pythonrun.o \
	../Python/pystate.o \
	../Python/pyfpe.o \
	../Python/mystrtoul.o \
	../Python/mysnprintf.o \
	../Python/modsupport.o \
	../Python/marshal.o \
	../Python/importdl.o \
	../Python/import.o \
	../Python/graminit.o \
	../Python/getversion.o \
	../Python/getplatform.o \
	../Python/getopt.o \
	../Python/getcopyright.o \
	../Python/getcompiler.o \
	../Python/getargs.o \
	../Python/frozenmain.o \
	../Python/frozen.o \
	../Python/errors.o \
	../Python/compile.o \
	../Python/ceval.o \
	../Python/bltinmodule.o \
	../Python/codecs.o \
	../Python/symtable.o \
	../Python/future.o \
	../Python/dynload_stub.o \
	../Python/pystrtod.o \
	../Python/thread.o \
	../Python/getmtime.o

OBJECTS_OBJECTS = \
	../Objects/typeobject.o \
	../Objects/tupleobject.o \
	../Objects/stringobject.o \
	../Objects/sliceobject.o \
	../Objects/rangeobject.o \
	../Objects/object.o \
	../Objects/obmalloc.o \
	../Objects/moduleobject.o \
	../Objects/methodobject.o \
	../Objects/longobject.o \
	../Objects/listobject.o \
	../Objects/intobject.o \
	../Objects/boolobject.o \
	../Objects/iterobject.o \
	../Objects/funcobject.o \
	../Objects/frameobject.o \
	../Objects/floatobject.o \
	../Objects/fileobject.o \
	../Objects/enumobject.o \
	../Objects/dictobject.o \
	../Objects/complexobject.o \
	../Objects/cobject.o \
	../Objects/classobject.o \
	../Objects/cellobject.o \
	../Objects/bufferobject.o \
	../Objects/abstract.o \
	../Objects/unicodectype.o \
	../Objects/unicodeobject.o \
	../Objects/descrobject.o \
	../Objects/weakrefobject.o \
	../Objects/structseq.o \
	../Objects/setobject.o \
	../Objects/exceptions.o \
	../Objects/genobject.o \
	../Objects/codeobject.o


OBJECTS_PARSER = \
	../Parser/tokenizer.o \
	../Parser/printgrammar.o \
	../Parser/parsetok.o \
	../Parser/parser.o \
	../Parser/node.o \
	../Parser/myreadline.o \
	../Parser/metagrammar.o \
	../Parser/listnode.o \
	../Parser/intrcheck.o \
	../Parser/grammar1.o \
	../Parser/grammar.o \
	../Parser/firstsets.o \
	../Parser/bitset.o \
	../Parser/acceler.o

OBJS_STACKLESS = ../Stackless/core/cframeobject.o \
	../Stackless/core/slp_transfer.o \
	../Stackless/core/stackless_util.o \
	../Stackless/core/stacklesseval.o \
	../Stackless/module/channelobject.o \
	../Stackless/module/flextype.o \
	../Stackless/module/scheduling.o \
	../Stackless/module/stacklessmodule.o \
	../Stackless/module/taskletobject.o \
	../Stackless/pickling/prickelpit.o \
	../Stackless/pickling/safe_pickle.o

OBJS_SQLITE = ../Modules/_sqlite/cache.o \
              ../Modules/_sqlite/connection.o \
              ../Modules/_sqlite/cursor.o \
              ../Modules/_sqlite/microprotocols.o \
              ../Modules/_sqlite/module.o \
              ../Modules/_sqlite/prepare_protocol.o \
              ../Modules/_sqlite/row.o \
              ../Modules/_sqlite/statement.o \
              ../Modules/_sqlite/util.o

OBJS_PSP2D = psp2d/psp2d.o \
	psp2d/controller.o \
	psp2d/screen.o \
	psp2d/timer.o \
	../../pymaging/color.o \
	../../pymaging/filters.o \
	../../pymaging/font.o \
	../../pymaging/image.o \
	../../pymaging/main.o \
	../../pymaging/mask.o \
	../../pymaging/transform.o

OBJS_PSPSND = \
	pspsnd/pspsnd.o \
	pspsnd/sound.o \
	pspsnd/music.o

OBJS_PSPNET = pspnet/pspnet.o

OBJS_OSLIB = osl/osl.o osl/image.o osl/ctrl.o osl/sound.o osl/map.o osl/font.o
OBJS_OSLIB_MOD = osl/sfont.o
OBJS_EXCEPTION_HANDLER = exceptionhandler/exception.o

OBJS_PSPOGG = pspogg/oggplayer.o pspogg/pspogg.o

OBJS_PSPMP3 = pspmp3/MusicEngine.o pspmp3/pspmp3.o

OBJS_SSL = ../Modules/_ssl.o \
           ../Modules/_hashopenssl.o

OBJS = main.o psperror.o support.o \
	$&#40;MODULES_STATIC&#41; $&#40;OBJECTS_PYTHON&#41; $&#40;OBJECTS_OBJECTS&#41; $&#40;OBJECTS_PARSER&#41; $&#40;OBJS_STACKLESS&#41;

CPPFLAGS=-Ipsp2d -I../../cpplibs -I../../imaging -I../../pymaging
LDFLAGS=-L../../cpplibs -L../../imaging/build-psp
LIBS=

ifeq &#40;$&#40;WITH_SQLITE&#41;,1&#41;
OBJS += $&#40;OBJS_SQLITE&#41;
CPPFLAGS += -I../Modules/_sqlite -DMODULE_NAME=\"sqlite3\" -DWITH_SQLITE
LIBS += -lsqlite3
endif

ifeq &#40;$&#40;WITH_PSP2D&#41;,1&#41;
OBJS += $&#40;OBJS_PSP2D&#41;
LDFAGS += -Llibpsp2d
LIBS += -lpsp2d -limaging -ljpeg -lpng -lz -lpspgu
CPPFLAGS += -DWITH_PSP2D -DIMAGING_MODULE_NAME=\"psp2d\"
endif

ifeq &#40;$&#40;WITH_PSPSND&#41;,1&#41;
OBJS += $&#40;OBJS_PSPSND&#41;
LDFLAGS += -Llibpspsnd
LIBS += -lpspsnd -lmikmod -lmmio -lpspaudiolib -lpspaudio
CPPFLAGS += -DWITH_PSPSND
endif

ifeq &#40;$&#40;WITH_PSPNET&#41;,1&#41;
OBJS += $&#40;OBJS_PSPNET&#41;
CPPFLAGS += -DWITH_PSPNET
LIBS += -lpspwlan
endif

ifeq &#40;$&#40;WITH_OSLIB&#41;,1&#41;
OBJS += $&#40;OBJS_OSLIB&#41;
LIBS += -losl -lpng -lz -lpspgu -lpspgum -lpspaudio -lpsphprm -ljpeg
CPPFLAGS += -DWITH_OSLIB
endif

ifeq &#40;$&#40;WITH_OSLIB_MOD&#41;,1&#41;
OBJS += $&#40;OBJS_OSLIB_MOD&#41;
LIBS += -lpsphttp -lpspssl -lpspwlan
CPPFLAGS += -DWITH_OSLIB_MOD
endif

ifeq &#40;$&#40;WITH_EXPCETION_HANDLER&#41;,1&#41;
OBJS += $&#40;OBJS_EXCEPTION_HANDLER&#41;
CPPFLAGS += -DWITH_EXPCETION_HANDLER
endif

ifeq &#40;$&#40;WITH_PSPOGG&#41;,1&#41;
OBJS += $&#40;OBJS_PSPOGG&#41;
LIBS += -lvorbisidec -lpspaudiolib -lpspaudio
CPPFLAGS += -DWITH_PSPOGG
endif

ifeq &#40;$&#40;WITH_PSPMP3&#41;,1&#41;
OBJS += $&#40;OBJS_PSPMP3&#41;
LIBS += -lpspaudio -lpspaudiocodec
CPPFLAGS += -DWITH_PSPMP3
endif

ifeq &#40;$&#40;WITH_SSL&#41;,1&#41;
OBJS += $&#40;OBJS_SSL&#41;
LIBS += -lssl -lcrypto
CPPFLAGS += -DWITH_SSL -I$&#40;PSPDEV&#41;/psp/include/openssl
endif

LIBS += -lpsppower -lpspsircs -lstdc++ -lbz2

CPPFLAGS += -DHAVE_CONFIG_H -DPSP -I../Include -I../Stackless
CPPFLAGS += -I../Modules/expat -DHAVE_MEMMOVE

LIBS += -lc -lm

CFLAGS = -Os -g -G0 -Wall -Wno-strict-aliasing -fPIC
CXXFLAGS = $&#40;CFLAGS&#41; -fno-rtti -fno-strict-aliasing
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak

psperror.c&#58;
	@cp $&#40;PSPDEV&#41;/psp/sdk/include/pspkerror.h ./pspkerror.h
	python generr.py
	@rm pspkerror.h

release&#58; distclean $&#40;PSP_EBOOT&#41;
	@echo "###### Create release package ######"
	@echo "1. Creating release directory $&#40;RELEASE_DIRECTORY&#41;/"
	@mkdir -p $&#40;RELEASE_DIRECTORY&#41;/
	@echo "2. Copying EBOOT to release dir."
	@cp -pR EBOOT.PBP $&#40;RELEASE_DIRECTORY&#41;/
	@echo "3. Copying Python libraries to release dir."
	@cd ../Lib && find . -path '*/.svn*' -prune -o -path '*/plat-*' -prune -o -path './test/*' -prune -o -path '*/msilib/*' -prune -o -path '*/curses/*' -prune -o -path '*/idlelib/*' -prune -o -path '*/lib-tk/*' -prune -o -print | zip $&#40;RELEASE_DIRECTORY&#41;/python.zip -q@
	@mkdir -p site-packages
	@cp -pR elementtree/elementtree site-packages/
	@find site-packages/ -path "*/.svn*" -print0 | xargs -0 rm -rf
	@zip -qr $&#40;RELEASE_DIRECTORY&#41;/python.zip site-packages/elementtree
	@rm -rf site-packages
	@echo "4. Release dir created on $&#40;RELEASE_DIRECTORY&#41;."
	@echo "###### Done ######"

distclean&#58;
	@echo "Cleaning $&#40;RELEASE_DIRECTORY&#41;"
	@rm -rf $&#40;RELEASE_DIRECTORY&#41;
	@echo "Done!"
	@echo ""
The .S file dosen't exist (it was in the temp directory), I tried stopping the compilation with CTRL-C but probably too late. :)

Ciaooo
Sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

try adding -S to CFLAGS in Makefile.base. It'll output assembly code of your C files. Try also -save-temps so it'll save temporary files.

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Sorry to reply so late (and thanks for your help).

The error is

Code: Select all

main.s&#58;712&#58; Warning&#58; setting incorrect section attributes for .rodata.sceModuleInfo
And line 712 is:

Code: Select all

.section	.rodata.sceModuleInfo,"aw",@progbits
Here's the main.s
http://www.megaupload.com/?d=CRT54YNI

Ciaooo
Sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

sakya wrote:Hi! :)

Sorry to reply so late (and thanks for your help).

The error is

Code: Select all

main.s&#58;712&#58; Warning&#58; setting incorrect section attributes for .rodata.sceModuleInfo
And line 712 is:

Code: Select all

.section	.rodata.sceModuleInfo,"aw",@progbits
Here's the main.s
http://www.megaupload.com/?d=CRT54YNI

Ciaooo
Sakya
.rodata.sceModuleInfo shouldn't be writable.
Can you post main.c?

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Many thanks. :)

Here's the full main.c

Code: Select all

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspsdk.h>
#include <pspiofilemgr.h>
#include <psppower.h>
#include <psputility_netmodules.h>
#include <psputility_sysparam.h>
#include <pspnet.h>
#include <pspnet_inet.h>
#include <pspnet_apctl.h>
#include <pspnet_resolver.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#ifdef WITH_SSL
/* Include OpenSSL header files */
#include "openssl/rsa.h"
#include "openssl/crypto.h"
#include "openssl/x509.h"
#include "openssl/pem.h"
#include "openssl/ssl.h"
#include "openssl/err.h"
#include "openssl/rand.h"
#endif

#ifdef WITH_EXPCETION_HANDLER
#include "exceptionhandler/exception.h"
#endif

#ifdef WITH_PSP2D
#include <pspgu.h>
#endif

#ifdef WITH_OSLIB
#include <oslib/oslib.h>
#endif

#include "Python.h"

#define VERS    2
#define REVS    52
PSP_MODULE_INFO&#40;"StacklessPython", 0, VERS, REVS&#41;;
PSP_MAIN_THREAD_ATTR&#40;PSP_THREAD_ATTR_USER|PSP_THREAD_ATTR_VFPU&#41;;
//PSP_HEAP_SIZE_KB&#40;18*1024&#41;; /* Use 18Mb */
PSP_HEAP_SIZE_KB&#40;-1024&#41;;    /* Leave 1024k to OS, rest to app */
PSP_MAIN_THREAD_STACK_SIZE_KB&#40;64&#41;;

volatile int pspInterruptOccurred = 0;

/*!
*	Exit callback function
*/
int exit_callback&#40;int arg1, int arg2, void *common&#41; &#123;
#ifdef WITH_OSLIB
    osl_quit = 1;
#else
    pspInterruptOccurred = 1;
    printf&#40;"--------------------------------------------------------------------------------\n"&#41;;
    fclose&#40;stdout&#41;;
    fclose&#40;stderr&#41;;
    sceKernelExitGame&#40;&#41;;
#endif
    return 0;
&#125;

/*!
*	Callback thread function
*/
int CallbackThread&#40;SceSize args, void *argp&#41; &#123;
    int cbid;

    cbid = sceKernelCreateCallback&#40;"Exit Callback", exit_callback, NULL&#41;;
    sceKernelRegisterExitCallback&#40;cbid&#41;;

    sceKernelSleepThreadCB&#40;&#41;;

    return 0;
&#125;

/*!
*	Sets up the callback thread and
*	returns its thread id function
*/
int SetupCallbacks&#40;void&#41; &#123;
    int thid = 0;

    thid = sceKernelCreateThread&#40;"update_thread", CallbackThread, 0x11, 0xFA0, 0, 0&#41;;   //als er foutenzijn dan  kan het hieraanliggen
    if&#40;thid >= 0&#41; &#123;
        sceKernelStartThread&#40;thid, 0, 0&#41;;
    &#125;

    return thid;
&#125;

/*!
*	Inits timezone based on PSP settings
*/


void initTimezone&#40;&#41; &#123;
    int tzOffset = 0;
    sceUtilityGetSystemParamInt&#40;PSP_SYSTEMPARAM_ID_INT_TIMEZONE, &tzOffset&#41;;
    int tzOffsetAbs = tzOffset < 0 ? -tzOffset &#58; tzOffset;
    int hours = tzOffsetAbs / 60;
    int minutes = tzOffsetAbs - hours * 60;
    int pspDaylight = 0;
    sceUtilityGetSystemParamInt&#40;PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS, &pspDaylight&#41;;
    static char tz&#91;18&#93;;
    sprintf&#40;tz, "GMT%s%02i&#58;%02i%s", tzOffset < 0 ? "+" &#58; "-", hours, minutes, pspDaylight ? " DST" &#58; ""&#41;;
    setenv&#40;"TZ", tz, 1&#41;;
    tzset&#40;&#41;;
&#125;

// Set heap size&#58;
/*void setHeapSize&#40;int newSize&#41;
&#123;
    int size = newSize / 1024;
    if &#40;size * 1024 < newSize&#41;
        size++;
    sce_newlib_heap_kb_size = size;
&#125;*/

int main&#40;int argc, char *argv&#91;&#93;&#41; &#123;
    SetupCallbacks&#40;&#41;;
    stdout = fopen&#40;"pytrace.txt", "w+"&#41;;
    stderr = stdout;
    setenv&#40;"PYTHONPATH", "python.zip", 1&#41;;
    setenv&#40;"PYTHONHOME", "ms0&#58;/", 1&#41;;

#ifdef WITH_EXPCETION_HANDLER
    initExceptionHandler&#40;&#41;;
#endif
    initTimezone&#40;&#41;;
    time_t now;
    sceKernelLibcTime&#40;&now&#41;;

#ifdef WITH_PSPNET
    if &#40;sceUtilityLoadNetModule&#40;PSP_NET_MODULE_COMMON&#41; < 0&#41;
        return 1;
    if&#40;sceUtilityLoadNetModule&#40;PSP_NET_MODULE_INET&#41; < 0&#41;
        return 1;

   if &#40;sceNetInit&#40;0x20000, 0x20, 0x1000, 0x20, 0x1000&#41; != 0&#41;
      return 1;
   if &#40;sceNetInetInit&#40;&#41; != 0&#41;
      return 1;
   if &#40;sceNetResolverInit&#40;&#41; != 0&#41;
      return 1;
   if &#40;sceNetApctlInit&#40;0x1400, 0x42&#41; != 0&#41;
      return 1;
#endif

#ifdef WITH_PSP2D
    sceGuInit&#40;&#41;;
#endif
#ifdef WITH_OSLIB
    oslInit&#40;1&#41;;
    oslSetExitCallback&#40;exit_callback&#41;;
#endif

#ifdef WITH_SSL
    /* Start the random number generator */
    time_t start_time;
    start_time = time&#40;NULL&#41;;
    RAND_seed&#40;&#40;unsigned char *&#41;&start_time, sizeof&#40;time_t&#41;&#41;;
#endif

    char path&#91;1024&#93;;
    printf&#40;"-------------- Python-PSP started %s\n", ctime&#40;&now&#41;&#41;;
    printf&#40;"Free stack memory&#58; %d\n", sceKernelGetThreadStackFreeSize&#40;0&#41;&#41;;
    printf&#40;"Free memory      &#58; %d\n", sceKernelTotalFreeMemSize&#40;&#41;&#41;;
    printf&#40;"PyPSP running in &#58; %s\n", getcwd&#40;path, sizeof&#40;path&#41;&#41;&#41;;
    printf&#40;"Search path      &#58; %s\n", Py_GetPath&#40;&#41;&#41;;
    printf&#40;"\n"&#41;;

    //scePowerSetClockFrequency&#40;333, 333, 166&#41;;
    FILE *fp;
    PySys_ResetWarnOptions&#40;&#41;;
    Py_SetProgramName&#40;"python"&#41;;

    Py_Initialize&#40;&#41;;
    PySys_SetArgv&#40;argc, argv&#41;;

    fp = fopen&#40;"script.py", "r"&#41;;
    if &#40;fp&#41; &#123;
        PyRun_SimpleFile&#40;fp, "script.py"&#41;;
        fclose&#40;fp&#41;;
    &#125; else &#123;
        printf&#40;"Error - could not open script.py\n"&#41;;
    &#125;

    Py_Finalize&#40;&#41;;

#ifdef WITH_PSP2D
    sceGuTerm&#40;&#41;;
#endif
    //pspSdkInetTerm&#40;&#41;;
#ifdef WITH_OSLIB
    osl_quit = 1;
#else
    pspInterruptOccurred = 1;
#endif
    printf&#40;"--------------------------------------------------------------------------------\n"&#41;;
    fclose&#40;stdout&#41;;
    fclose&#40;stderr&#41;;
    sceKernelExitGame&#40;&#41;;
    return 0;
&#125;
Ciaooo
Sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

wich pspsdk are you using?

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

ab5000 wrote:wich pspsdk are you using?
I updated it a pair of weeks ago (don't remember the svn version)

EDIT: If this is the problem I can reinstall cygwin+pspsdk (but I'd be happy to avoid it). :)

Ciaooo
Sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

sakya wrote:
ab5000 wrote:wich pspsdk are you using?
I updated it a pair of weeks ago (don't remember the svn version)

Ciaooo
Sakya
umh...
check if in pspdev/psp/sdk/include/pspmoduleinfo.h:
typedef const _sceModuleInfo SceModuleInfo;
if SceModuleInfo is const GCC shouldn't make .rodata.sceModuleInfo writable.

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
ab5000 wrote:check if in pspdev/psp/sdk/include/pspmoduleinfo.h
Yes, here it is:

Code: Select all

typedef struct _scemoduleinfo &#123;
	unsigned short		modattribute;
	unsigned char		modversion&#91;2&#93;;
	char			modname&#91;27&#93;;
	char			terminal;
	void *			gp_value;
	void *			ent_top;
	void *			ent_end;
	void *			stub_top;
	void *			stub_end;
&#125; _sceModuleInfo;

typedef const _sceModuleInfo SceModuleInfo;
mmmm...I'll try to reinstall the full cygwin + psptoolchain...uff. :)
Thanks for your help

Ciaooo
Sakya
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

sakya wrote:Hi! :)
ab5000 wrote:check if in pspdev/psp/sdk/include/pspmoduleinfo.h
Yes, here it is:

Code: Select all

typedef struct _scemoduleinfo &#123;
	unsigned short		modattribute;
	unsigned char		modversion&#91;2&#93;;
	char			modname&#91;27&#93;;
	char			terminal;
	void *			gp_value;
	void *			ent_top;
	void *			ent_end;
	void *			stub_top;
	void *			stub_end;
&#125; _sceModuleInfo;

typedef const _sceModuleInfo SceModuleInfo;
mmmm...I'll try to reinstall the full cygwin + psptoolchain...uff. :)
Thanks for your help

Ciaooo
Sakya
is seem a binutils bug.
try to reinstall the psptoolchain from svn.

Code: Select all

%&#58;include<stdio.h>
int _&#40;int __,int ___,int ____,int _____&#41;
<%for&#40;;____<___;_____=_____*__,____++&#41;;
return _____;%>main&#40;&#41;<%printf
&#40;"%d\n",_&#40;2,5,0,1&#41;&#41;;%>
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
ab5000 wrote:is seem a binutils bug.
try to reinstall the psptoolchain from svn.
I'm reinstalling the full cygwin+psptoolchain. :)
I'll let you know if this solves the problem.

Btw it's a strange bug: this is the only source which gives me this warning...

Ciaooo
Sakya
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Sorry for the doule post.

I reinstalled all the toolchain on Ubuntu but when I try to compile the project I get the same exact warning...
Does someone have an idea to solve this?

Many thanks
Ciaooo
Sakya
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

No idea, as ab5000 says the "const" tag should prevent it from being marked writable. Could you post the full source, so we can try to reproduce the problem?
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
jimparis wrote:No idea, as ab5000 says the "const" tag should prevent it from being marked writable. Could you post the full source, so we can try to reproduce the problem?
I have this problem with the Stackless Python PSP source, you can find it here:
http://code.google.com/p/pspstacklesspython/

Many thanks for your help. ;)

Ciaooo
Sakya
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Which branch/tag/version? I tried PSPStacklessPython2.5.2_R1 tag and it compiles fine here (with various stuff disabled in the Makefile since I'm too lazy to track down all the dependencies)
Post Reply