Problem with gcc toolchain

Discussion in 'Homebrew Development' started by Bobby_Downgrades, Jun 12, 2018.

  1. 184
    171
    72
    Bobby_Downgrades

    Bobby_Downgrades Developer

    Joined:
    Oct 18, 2015
    Messages:
    184
    Likes Received:
    171
    Trophy Points:
    72
    Gender:
    Male
    Location:
    ofw/update_files/unpacked/core_os
    Home Page:
    Short explanation:
    Using visual studio 2010.
    sdk 3.60 (also tried 4.75)
    I wrote an sprx that uses code that requires using libc_stub.a as an additional dependency.
    Problem is when I include that dependency it freezes the ps3 when I run the sprx.

    The signature of the file is no issue.
    If I comment the code and remove libc_stub.a from the dependencies the sprx runs fine.

    Code uses malloc and f functions (fopen fread fseek and such).

    I don't suppose anyone else has come across this issue ?

    Maybe I should look for a version of libc_stub.a from an older or newer sdk ? (have already tried newer versions).
     
  2. 126
    165
    72
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    126
    Likes Received:
    165
    Trophy Points:
    72
    Location:
    Germany
  3. 434
    257
    97
    haxxxen

    haxxxen Developer

    Joined:
    Oct 16, 2014
    Messages:
    434
    Likes Received:
    257
    Trophy Points:
    97
    I guess you are making a vsh plugin?
    you have to link with those custom libraries from mysis and 3141card instead of the standard sdk library. I think therifboy has written about it, that you have to either hexedit the elf file or use different library to link with

    search the elf for "sys_libc" and replace with "stdc" or in hex search for "7379735F6C696263" and replace with "7374646300000000"

    what I remember, that only happens with vs
     
  4. 126
    165
    72
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    126
    Likes Received:
    165
    Trophy Points:
    72
    Location:
    Germany
    Yes, VSH plugins are part of the VSH process and this process export his own libraries.

    The methode from therifboy(replace the module name) ensure that the static linked C lib stuff from vsh.self
    is used. That will only work for functions which was static linked at compiling time of vsh.self, kk.

    mysis use a function for find a vsh export by module name and F(unction)N(ode)ID. This methode not need extern stub libs.
    If you need not much exports, this is maybe the best methode for you. Look at mysis plugin sources.

    I build years ago the stub libraries + headers, it make my tests more simple to this time. With any sample I load they up and you
    can find they now in varius source codes, for example in aldos webMAN-MOD, the lib folder. Headers are in folder vsh.
    You can add my stubs in VS 2010, works fine.

    AFAIK, the link I post you above contains all three methodes. Find out what is the best way for your project.
     
    bguerville and aldostools like this.
  5. 434
    257
    97
    haxxxen

    haxxxen Developer

    Joined:
    Oct 16, 2014
    Messages:
    434
    Likes Received:
    257
    Trophy Points:
    97
    oops, sorry @3141card
    that was the page where I have read about this and I haven't looked at your link
     
    3141card likes this.
  6. 126
    165
    72
    3141card

    3141card Developer

    Joined:
    Oct 13, 2014
    Messages:
    126
    Likes Received:
    165
    Trophy Points:
    72
    Location:
    Germany
    No prob :)
     
  7. 184
    171
    72
    Bobby_Downgrades

    Bobby_Downgrades Developer

    Joined:
    Oct 18, 2015
    Messages:
    184
    Likes Received:
    171
    Trophy Points:
    72
    Gender:
    Male
    Location:
    ofw/update_files/unpacked/core_os
    Home Page:
    @3141card and @haxxxen, thank you both for the information, was very helpful and now my problem is solved,
    I used only one export which after using mysis way I now have no exports, thank you both again.
     
    3141card likes this.

Share This Page