Welcome, Guest. Please login or register.

Author Topic: Freescale Coldfire V4s  (Read 6248 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show only replies by Fats
Re: Freescale Coldfire V4s
« Reply #29 from previous page: April 09, 2012, 01:01:45 PM »
Quote from: Piru;687721
There is no way to tell which part of the binary is code and which data. If you translate data in similar manner you'll just corrupt it.


What you do know is that the program entry is code. You can start from there and put traps in sections where you are not sure (e.g jmp tables etc.). You could combine it with a cache that remembers translated code.
In a later stage you can make tools that makes binary patches from this cache so this information can be distributed or updated so that the loader doesn't need to find out each time it loads a program.
Non-trivial job, I agree, but what would we hobby programmers do otherwise ?

greets,
Staf.
Trust me...                                              I know what I\'m doing
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Freescale Coldfire V4s
« Reply #30 on: April 09, 2012, 01:14:05 PM »
Quote from: Fats;687722
What you do know is that the program entry is code. You can start from there and put traps in sections where you are not sure (e.g jmp tables etc.). You could combine it with a cache that remembers translated code.
In a later stage you can make tools that makes binary patches from this cache so this information can be distributed or updated so that the loader doesn't need to find out each time it loads a program.
Non-trivial job, I agree, but what would we hobby programmers do otherwise ?

greets,
Staf.
I think the key here is that any work you would need to do to get 68k executing on the cold fire, would be true of faster, cheaper processors.

I still think Iggy should have some fun with this project (this is the whole point of AROS after all), but be under no illusions of good or even passable 68k compatiblity :)

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Freescale Coldfire V4s
« Reply #31 on: April 09, 2012, 01:14:56 PM »
Quote from: Fats;687722
What you do know is that the program entry is code. You can start from there and put traps in sections where you are not sure (e.g jmp tables etc.). You could combine it with a cache that remembers translated code.
In a later stage you can make tools that makes binary patches from this cache so this information can be distributed or updated so that the loader doesn't need to find out each time it loads a program.

No, it still won't work. This doesn't account for code that dynamically jumps into various parts of code or performs run-time modifications to the code. Static analysis cannot account for these.

The only way to do this reliably is to perform the translation run-time, that is JIT.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Freescale Coldfire V4s
« Reply #32 on: April 09, 2012, 02:32:18 PM »
Quote
What you do know is that the program entry is code. You can start from there and put traps in sections where you are not sure (e.g jmp tables etc.).


This is what I was referring to - you should be aware that this is a manual task as exhaustively doing this in software is not possible (except for trivial programs). Someone has to check/patch the 68k code and (hopefully) share his findings with others through a database on the 'net which the binary loader uses in turn to patch code while it's being loaded. Not likely to happen.
 

Offline IggyTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Freescale Coldfire V4s
« Reply #33 on: April 09, 2012, 06:49:48 PM »
Quote from: Piru;687724
No, it still won't work. This doesn't account for code that dynamically jumps into various parts of code or performs run-time modifications to the code. Static analysis cannot account for these.

The only way to do this reliably is to perform the translation run-time, that is JIT.

Piru is absolutely right that self modifying code will never work via a translation process, thus requiring JIT.
And as bloodline has pointed out this is better suited to faster processor.
And again, bloodline has pointed out that this is just a project for the fun of it.
Don't expect me to leave behind NG OS' anytime soon.
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show only replies by Fats
Re: Freescale Coldfire V4s
« Reply #34 on: April 09, 2012, 08:02:49 PM »
Quote from: Piru;687724
No, it still won't work. This doesn't account for code that dynamically jumps into various parts of code or performs run-time modifications to the code. Static analysis cannot account for these.


For run-time modification I agree, dynamically jmp should be able to be trapped by adding trap code like a debugger does.

greets,
Staf.
Trust me...                                              I know what I\'m doing
 

Offline IggyTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Freescale Coldfire V4s
« Reply #35 on: April 09, 2012, 08:43:39 PM »
Quote from: Fats;687779
For run-time modification I agree, dynamically jmp should be able to be trapped by adding trap code like a debugger does.

greets,
Staf.

I agree that that could be trapped, leaving only self modifying code as a problem.
Besides, its inevitable that some software simply isn't going to run on a system like this (unless it also supports 68k emulation or a soft core).
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"