Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
227 user(s) are online (137 user(s) are browsing Forums)

Members: 0
Guests: 227

more...

Headlines

Forum Index


Board index » All Posts (softwarefailure)




Re: binutils 2.40 first native(!) beta tests !
Just popping in
Just popping in


Oh man, thanks a lot, you're my personal hero. Looks like amigans.net is the place to turn to now when having problems with the SDK. I've been on this for months and asked several people and was repeatedly told even by SDK team members that it's binutils fault and "there is nothing you can do about it at moment" and they were working on new binutils. But apparently all I need to do is manually including crtbegin.o and crtend.o on the link line. So I'm linking like this now:

gcc -nostartfiles -athread=single -mcrt=clib2 -o test crtbegin.o obj1.o obj2.o obj3.o objN.o crtend.o


This works nicely so once again thanks a lot for your help!

Go to top


Re: binutils 2.40 first native(!) beta tests !
Just popping in
Just popping in


Quote:

Your _fini(void) function can't work because int j (why static?) isn't initialized to 0 and therefore __DTOR_LIST__[j+1]() may be a random memory address and not a destructor function pointer from __DTOR_LIST__[]


As per the C standard, static variables are auto-initialized to 0 so it's not necessary to explicitly initialize them to 0. Nevertheless, I've just tried to initialize "j" to 0 explicitly but unsurprisingly this doesn't make a difference and the program crashes in the very same way with an instruction fault at address 0xC0DEFACC (sic!)

As to why "j" is declared static, no idea. As I said in the thread over at the Hyperion forums I took this code straight from clib2. It's the standard clib2 constructor/destructor (de)initialization code so I don't think there's anything wrong with it.

According to afxgroup's reply on the Hyperion forums it's a bug in the binutils which don't NULL-terminate the ctor/dtor lists on linking, thereby causing invalid ctors/dtors getting called. That's why I was hoping the latest binutils would fix the issue but it's still there :(

Go to top


Re: binutils 2.40 first native(!) beta tests !
Just popping in
Just popping in


Thanks for the update. Unfortunately, my problem with the manual execution of the clib2 constructors and destructors still persists with the new binutils. I've posted a short sample program that demonstrates the issue here: https://forum.hyperion-entertainment.com/viewtopic.php?f=26&t=4964

I've tried to compile the sample program with gcc 11.2.0 and kas1e's latest binutils but it still crashes. The address is somewhat curious though: Grim Reaper reports the address as 0xc0defacc ....

Go to top


Re: Learning HollyWood (~Tutorial) Vol. 1
Just popping in
Just popping in


@Atheist

Nothing easier than that:

str$ = BinStr(ReadInt(1))

That's all, really.

Concerning your problem above (replacing a character or string with a different character or string), you should use the new Hollywood 4.0 command SetLayerStyle() which can do that with ease, e.g.

Print("a")
WaitLeftMouse
SetLayerStyle(1, {Text = "b"}) ; exchange "a" with "b"

Go to top



TopTop




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project