Debugging dvp-as... (crashes on DMARet *)
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?
.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?
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
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
I have used ee-dvp-as from the PS2Linux kit in native ps2 elfs. It works like a charm. Last time I checked, they were binaries available for download from the Playstation2-linux website. There is also vumacros.h which contains useful VU macros as the name implies.
Try these links
Under Cygwin
------------
http://playstation2-linux.com/projects/cfyc/
download the file gcc-2.95.2-ps2linux-win32.zip
Under linux
-----------
http://playstation2-linux.com/projects/ps2stuff/
download the file binutils-2.9EE-cross.tar.gz
Sample Code (vumacros.h)
http://playstation2-linux.com/projects/vcl
download the file vcl-samples.tgz
Try these links
Under Cygwin
------------
http://playstation2-linux.com/projects/cfyc/
download the file gcc-2.95.2-ps2linux-win32.zip
Under linux
-----------
http://playstation2-linux.com/projects/ps2stuff/
download the file binutils-2.9EE-cross.tar.gz
Sample Code (vumacros.h)
http://playstation2-linux.com/projects/vcl
download the file vcl-samples.tgz
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:
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
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: Select all
DMAref qcount,label
..
label:
..
Are there any sources for those binutils (packaged in 2002, quite old)?
b0rje