| View previous topic :: View next topic |
| Author |
Message |
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
Posted: Wed Feb 21, 2007 11:27 pm Post subject: Debugging dvp-as... (crashes on DMARet *) |
|
|
dvp-as crashes while trying to compile this .vsm :
.align 4
DMAret *
vifnop
vifnop
vifnop
MPG 0,*
NOP
.align 4
.EndMPG
.EndDmaData
The problem seems to be "DMAret *", but it's something automatically generated by vcl... So, better fix that problem...
Using addr2line tool I could find out that crash occurs in this function :
(gas/configure/tc-dvp.c line 1757)
long
dvp_relax_frag (fragP, stretch)
fragS * fragP;
long stretch;
{
/* Address of variable part. */
long address = fragP->fr_address + fragP->fr_fix;
/* Symbol marking start of data. */
symbolS * symbolP = fragP->fr_symbol;
/* Address of the symbol. */
long target;
long growth;
/* subtype >= 10 means "done" */
if (RELAX_DONE_P (fragP->fr_subtype))
return 0;
/* vu insn? */
if (fragP->fr_subtype == RELAX_VU)
{
fragP->fr_subtype = RELAX_ENCODE (RELAX_VU, 0);
return 0;
}
target = S_GET_VALUE (symbolP) + symbolP->sy_frag->fr_address;
...
It's symbolP->sy_frag that points to an illegal address...
Is there anyone here knowing well this code, added by ps2toolchain's binutil2.14 patch? |
|
| Back to top |
|
 |
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
Posted: Thu Feb 22, 2007 12:57 am Post subject: |
|
|
Until some guru pops up, I think I will just add my own version of dvp-as in archive ps2_gasp_vcl.zip.
This version will ignore the following lines:
DMAret *
vifnop
MPG 0,*
.EndMPG
.EndDmaData
And will consider DMAret * as the missing .vu
It seems compilation goes well with these changes. |
|
| Back to top |
|
 |
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
|
| Back to top |
|
 |
b0rje
Joined: 12 May 2005 Posts: 7
|
Posted: Thu Feb 22, 2007 4:56 am Post subject: |
|
|
hi,
i had the same problem. Its not the DMAret, its the MPG that crashes dvp-as, as well as DIRECT(HL) commands. Its a pity this doesnt work, this would make some things much more comfortable..
Are you using the "-m" flag when calling vcl? Without this flag, those tags are generally not generated, so ommiting this, you would not have to use this kind of patched dvp-as. hope this helps.
(I'm using vcl vcl_14beta7_x86)
b0rje |
|
| Back to top |
|
 |
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
Posted: Thu Feb 22, 2007 7:17 pm Post subject: |
|
|
| Thanks. Yes, removing -m is an easier solution. |
|
| Back to top |
|
 |
carlosn
Joined: 10 Mar 2005 Posts: 38 Location: Orlando, Florida, US
|
|
| Back to top |
|
 |
b0rje
Joined: 12 May 2005 Posts: 7
|
Posted: Sat Feb 24, 2007 4:42 am Post subject: |
|
|
yep,
interesting, this really seems to work with this binary version. there is another bug "solved" in this version concerning correct handling of dma-tags, using:
| Code: |
DMAref qcount,label
..
label:
..
|
resulted in "internal error: unsupported relocation error" when linking with ee-ld. With this version it works (at least no error message, I didnt test the resulting chain)!
Are there any sources for those binutils (packaged in 2002, quite old)?
b0rje |
|
| Back to top |
|
 |
carlosn
Joined: 10 Mar 2005 Posts: 38 Location: Orlando, Florida, US
|
Posted: Sat Feb 24, 2007 9:57 am Post subject: |
|
|
| The sources are on DVD # 2 of the Playstation2 linux Kit. The good news is that the second DVD is all GPL and can be distributed at will. I own a set of discs but I don't have a site to host the packages. |
|
| Back to top |
|
 |
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
Posted: Sat Feb 24, 2007 6:53 pm Post subject: |
|
|
Wow... That's great news! Thx a lots for the tip carlosn!
I've added stripped versions (smaller) of ee-gasp & ee-dvp-as to the archive and where it comes from in txt file. |
|
| Back to top |
|
 |
ammonton
Joined: 17 Feb 2007 Posts: 3
|
Posted: Sat Feb 24, 2007 9:02 pm Post subject: |
|
|
| DVD#2 is up on PirateBay. Search for "ps2 linux", there even seems to be a couple of seeders. |
|
| Back to top |
|
 |
|