Weird things about the symbols table

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
Radamantis
Posts: 4
Joined: Mon Apr 14, 2008 7:00 pm
Location: Caserta - Italy
Contact:

Weird things about the symbols table

Post by Radamantis »

Hi, i'm an italian student and i'm experiencing programming in the cell environment for my graduation thesis. Today something weird happened when i compiled an SPU image using spu-gfortran: when i started the ppu program with the spu image, i got an error message saying "OS ERROR: NOT ENOUGH SPACE"; so i looked at the spu image and i've seen that it was 640kb! i tried to delete some functions and compiled using the -O2 flag, but nothing very significative happened... so, just for fun, i tried to strip the image, and i've seen that without the symbol table it was 220kb... in the end, i've compiled with the -s flag, executed the whole program (including the ppu) and everything worked fine.

The question i've got for you now is... is it possible that the compiler adds a symbols table 400kb large? if so, why the hell to do this? thanks a lot for every answer, i'm going to really appreciate it.
Radamantis, the greatest caution
Radamantis
Posts: 4
Joined: Mon Apr 14, 2008 7:00 pm
Location: Caserta - Italy
Contact:

Solved!

Post by Radamantis »

Thanks for visiting the topic guys, i've fixed the problem.

I noticed that in the fortran code was a write function, that prints to the standard output a message when something goes wrong... deleting it the image is 40kb large. I think that to avoid performing too much dma requests, the spu-gfortran compiler statically includes the whole i/o library.

I'm really sorry for no thinking about it.
Radamantis, the greatest caution
Post Reply