When making prx: Error, found no relocation sections

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

Moderators: cheriff, TyRaNiD

Post Reply
Noko
Posts: 23
Joined: Sat Sep 06, 2008 8:35 pm

When making prx: Error, found no relocation sections

Post by Noko »

I'm having troubles making my program run on lite. Everything compiles and links fine, but psp-prxgen fails with "Error, found no relocation sections"

Here's the output of make:

Code: Select all

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -I. -I/usr/local/pspdev/psp/sdk/include -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -fno-exceptions -fno-rtti -D_PSP_FW_ERSION=350   -c -o cache.o cache.cc
<skipped>
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -I. -I/usr/local/pspdev/psp/sdk/include -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=350   -c -o userinput.o userinput.cc
psp-gcc cache.o globals.o highlevel.o list.o resize.o rw_lcscript.o rw_ymk.o script.o strings.o utils.o game.o hash.o main.o rw.o sjis.o unicode.o yamlx.o interface.o calendar.o userinput.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDL_ttf -lfreetype -lyaml -lSDL_mixer -lSDL_image -lSDL_gfx -ljpeg -lpng -lz -lvorbisfile -lvorbis -logg -lSDL -lGL -lm -lstdc++ -lc -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspdisplay  -lpspgu -lpspge -lpspctrl -lpspsdk   -lpspaudio -lpspvfpu -lpsphprm -lpsprtc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o noscript.elf
psp-fixup-imports noscript.elf
psp-prxgen noscript.elf noscript.prx
Error, found no relocation sections
mksfoex -d MEMSIZE=1 'ONE' PARAM.SFO
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
                NULL NULL NULL  \
                NULL  noscript.prx NULL
ERROR&#58; Could not open the file. &#40;noscript.prx&#41;
make&#58; *** &#91;EBOOT.PBP&#93; Error 255
readelf -S:

Code: Select all

There are 40 section headers, starting at offset 0x4460ac&#58;

Section Headers&#58;
  &#91;Nr&#93; Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  &#91; 0&#93;                   NULL            00000000 000000 000000 00      0   0  0
  &#91; 1&#93; .reginfo          MIPS_REGINFO    08900000 191228 000018 01      0   0  4
  &#91; 2&#93; .init             PROGBITS        08900018 001018 000028 00  AX  0   0  1
  &#91; 3&#93; .text             PROGBITS        08900040 001040 152c6c 00  AX  0   0  4
  &#91; 4&#93; .fini             PROGBITS        08a52cac 153cac 000020 00  AX  0   0  1
  &#91; 5&#93; .sceStub.text     PROGBITS        08a52ccc 153ccc 000260 00  AX  0   0  4
  &#91; 6&#93; .lib.ent.top      PROGBITS        08a52f2c 153f2c 000004 00   A  0   0  4
  &#91; 7&#93; .lib.ent          PROGBITS        08a52f30 153f30 000020 00   A  0   0  4
  &#91; 8&#93; .lib.ent.btm      PROGBITS        08a52f50 153f50 000004 00   A  0   0  4
  &#91; 9&#93; .lib.stub.top     PROGBITS        08a52f54 153f54 000004 00   A  0   0  4
  &#91;10&#93; .lib.stub         PROGBITS        08a52f58 153f58 0000f0 00   A  0   0  4
  &#91;11&#93; .lib.stub.btm     PROGBITS        08a53048 154048 000004 00   A  0   0  4
  &#91;12&#93; .rodata.sceModule PROGBITS        08a53050 154050 000040 00   A  0   0 16
  &#91;13&#93; .rodata.sceReside PROGBITS        08a53090 154090 0000fc 00   A  0   0  4
  &#91;14&#93; .rodata.sceNid    PROGBITS        08a5318c 15418c 000130 00   A  0   0  4
  &#91;15&#93; .rodata           PROGBITS        08a532c0 1542c0 029684 00   A  0   0 16
  &#91;16&#93; .eh_frame         PROGBITS        08a7ca44 17da44 0007b8 00  WA  0   0  4
  &#91;17&#93; .gcc_except_table PROGBITS        08a7d1fc 17e1fc 0000e4 00  WA  0   0  4
  &#91;18&#93; .ctors            PROGBITS        08a7d2e0 17e2e0 000020 00  WA  0   0  4
  &#91;19&#93; .dtors            PROGBITS        08a7d300 17e300 000008 00  WA  0   0  4
  &#91;20&#93; .jcr              PROGBITS        08a7d308 17e308 000004 00  WA  0   0  4
  &#91;21&#93; .data             PROGBITS        08a7d310 17e310 012df0 00  WA  0   0 16
  &#91;22&#93; .sdata            PROGBITS        08a90100 191100 000128 00 WAp  0   0  8
  &#91;23&#93; .sbss             NOBITS          08a90228 191228 000134 00 WAp  0   0  8
  &#91;24&#93; .bss              NOBITS          08a90380 191228 02f0d0 00  WA  0   0 64
  &#91;25&#93; .comment          PROGBITS        00000000 191240 00328e 00      0   0  1
  &#91;26&#93; .debug_aranges    MIPS_DWARF      00000000 1944d0 003410 00      0   0  8
  &#91;27&#93; .debug_pubnames   MIPS_DWARF      00000000 1978e0 008f54 00      0   0  1
  &#91;28&#93; .debug_info       MIPS_DWARF      00000000 1a0834 141f3c 00      0   0  1
  &#91;29&#93; .debug_abbrev     MIPS_DWARF      00000000 2e2770 029a61 00      0   0  1
  &#91;30&#93; .debug_line       MIPS_DWARF      00000000 30c1d1 038578 00      0   0  1
  &#91;31&#93; .debug_frame      MIPS_DWARF      00000000 34474c 00fed0 00      0   0  4
  &#91;32&#93; .debug_str        MIPS_DWARF      00000000 35461c 025a78 01  MS  0   0  1
  &#91;33&#93; .debug_loc        MIPS_DWARF      00000000 37a094 0b993b 00      0   0  1
  &#91;34&#93; .mdebug.eabi32    PROGBITS        00000000 4339cf 000000 00      0   0  1
  &#91;35&#93; .gcc_compiled_lon PROGBITS        00000000 4339cf 000000 00      0   0  1
  &#91;36&#93; .debug_ranges     MIPS_DWARF      00000000 4339cf 012528 00      0   0  1
  &#91;37&#93; .shstrtab         STRTAB          00000000 445ef7 0001b2 00      0   0  1
  &#91;38&#93; .symtab           SYMTAB          00000000 4466ec 014570 10     39 2453  4
  &#91;39&#93; .strtab           STRTAB          00000000 45ac5c 016f09 00      0   0  1
Key to Flags&#58;
  W &#40;write&#41;, A &#40;alloc&#41;, X &#40;execute&#41;, M &#40;merge&#41;, S &#40;strings&#41;
  I &#40;info&#41;, L &#40;link order&#41;, G &#40;group&#41;, x &#40;unknown&#41;
  O &#40;extra OS processing required&#41; o &#40;OS specific&#41;, p &#40;processor specific&#41;
What do I do now? Is it issue of ordering of libraries? I'm using latest psptoolchain from svn, just rebuilt it toady.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

How are you getting it to build? I am assuming you are using a custom makefile :)
Noko
Posts: 23
Joined: Sat Sep 06, 2008 8:35 pm

Post by Noko »

Oh

I found the mistake

I had LINK.c = psp-gcc in my Makefile which removes additional flags to linker
Post Reply