neurosis:~/tmp/cairo/sample$ gdb `which psp-ld`
GNU gdb 6.3-debian
(gdb) set args -L../src main.o -lcairo
(gdb) r
Starting program: /usr/local/pspdev/bin/psp-ld -L../src main.o -lcairo
Program received signal SIGSEGV, Segmentation fault.
_bfd_mips_elf_hide_symbol (info=0x8103980, entry=0x815e650, force_local=1) at ../../bfd/elfxx-mips.c:8373
8373 ../../bfd/elfxx-mips.c: No such file or directory.
in ../../bfd/elfxx-mips.c
(gdb) bt
#0 _bfd_mips_elf_hide_symbol (info=0x8103980, entry=0x815e650, force_local=1) at ../../bfd/elfxx-mips.c:8373
#1 0x0808b748 in mips_elf_record_global_got_symbol (h=0x815e650, abfd=0x812fd80, info=0x8103980, g=0x0, tls_flag=0 '\0')
at ../../bfd/elfxx-mips.c:2635
#2 0x0808befe in _bfd_mips_elf_check_relocs (abfd=0x812fd80, info=0x8103980, sec=0x816e04c, relocs=0x8173a44)
at ../../bfd/elfxx-mips.c:6151
#3 0x080a5153 in bfd_elf_link_add_symbols (abfd=0x812f798, info=0x8103980) at ../../bfd/elflink.c:4382
#4 0x080a35a4 in elf_link_add_archive_symbols (abfd=0x812f798, info=0x8103980) at ../../bfd/elflink.c:4650
#5 0x080a3bcb in bfd_elf_link_add_symbols (abfd=Variable "abfd" is not available.
) at ../../bfd/elflink.c:4706
#6 0x0805111e in load_symbols (entry=0x811976c, place=0xbfdc55c4) at ../../ld/ldlang.c:1869
#7 0x080575bf in open_input_bfds (s=0x811976c, force=0) at ../../ld/ldlang.c:2279
#8 0x08057788 in lang_process () at ../../ld/ldlang.c:4743
#9 0x08059bec in main (argc=4, argv=0xbfdc5794) at ../../ld/ldmain.c:458
(gdb)
Sorry, no time to look into it further at the moment.
chinaet wrote:I am SUCCESS to build the sources in MAC OSX.no any crash.
So the example is working, too? I didn't know that I'm so good that there are no missing external references and the like :-) Which version of the PSPSDK toolchain did you use?
Please add a loop around the drawing function (perhaps 100 times) and measure how long it needs to execute it, to check if it is worth to invest some more time in it.
I've added a check for NULL to the linker, now it says "undefined reference to `cairo_ft_scaled_font_backend'" instead of crashings and I can continue to port Cairo.