Post by Albert van der HorstMarvellous!
How is the options and library doing?
Can you say
xina -a
and do
REQUIRE DEBUG DO-DEBUG
REQUIRE DUMP PAD 100 DUMP
REQUIRE SEE SEE DUMP
and all that ?
Well, as you've probably realized I've been porting your stable
version 4.x not the 5.
All the above seems to work except REQUIRE DEBUG - it says it's not
present but I get the exact same result on the same untouched version
of lina running on linux, so maybe my forth.lab file is a little out
of date.
So files/blocks and options are probably okay.
If you asked if I have any concerns at present:
* I mapped the newselect syscall to select. Seems to work so far. /
fingers crossed.
* I really need to get the kernel source to find out about all these
syscalls, ie the quickfix for fork the OS X one turns out to be quite
a bit different than the linux one in terms of return values - I don't
know if my dirty fix will return the appropriate error message should
one occur.
Post by Albert van der HorstOkay, here is the plan, assuming you are using mach-o objects.
(I read the doc's, it is gonna be no pick-nick!)
You said it heh. It'll be fun though. Be worth it.
I'm gonna be really busy in real life for the next 5 days though, so
don't hold your breath, but as soon as I can, I'll email you some
results. You can get me at this email at gmail.
Post by Albert van der HorstD. The output of
HEX BM . EM .
At the moment, this I can get you.
BM = 0x20C8, EM = 0x4002054
Difference, ie EM BM - . 0x3FFFF8C
It is slightly different from the linux values, but from memory I
think linux binaries start executing higher up.
ie on lina on my debian, I get BM = 0x8049074, 0xC049000 again with a
difference of 0x3FFFF8C
Post by Albert van der HorstE. A DUMP of everything below BM that you can still fetch
without a crash.
With what I have, I can show you this:
REQUIRE DUMP HEX \ BM = 0x20C8
OK
1000 100 DUMP
0000,1000: CEFA EDFE 0700 0000 0300 0000 0200 0000 |................|
0000,1010: 0800 0000 3C02 0000 8500 0000 0100 0000 |....<...........|
0000,1020: 3800 0000 5F5F 5041 4745 5A45 524F 0000 |8...__PAGEZERO..|
0000,1030: 0000 0000 0000 0000 0010 0000 0000 0000 |................|
0000,1040: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0000,1050: 0000 0000 0100 0000 7C00 0000 5F5F 5445 |........|...__TE|
0000,1060: 5854 0000 0000 0000 0000 0000 0010 0000 |XT..............|
0000,1070: 0080 0000 0000 0000 0080 0000 0700 0000 |................|
0000,1080: 0700 0000 0100 0000 0000 0000 5F5F 7465 |............__te|
0000,1090: 7874 0000 0000 0000 0000 0000 5F5F 5445 |xt..........__TE|
0000,10A0: 5854 0000 0000 0000 0000 0000 C820 0000 |XT........... ..|
0000,10B0: 386F 0000 C810 0000 0000 0000 0000 0000 |8o..............|
0000,10C0: 0000 0000 0004 0080 0000 0000 0000 0000 |................|
0000,10D0: 0100 0000 7C00 0000 5F5F 4441 5441 0000 |....|...__DATA..|
0000,10E0: 0000 0000 0000 0000 0090 0000 00A0 FF03 |................|
0000,10F0: 0080 0000 0000 0000 0700 0000 0700 0000 |................|
OK
FFF @
Bus error
The magic number is winking at us from $1000 = shows the mach-o
header. This is exactly how the file looks like on disk. Anything
lower falls into the first 4k, pagezero, as you can see, the OS
doesn't like it when I touch it.
So access to the headers does not seem too difficult.
I think I see what you're getting at though, you want to see what
changes in the headers in the 2 differently sized binaries?
I'll get back to you on the other jobs, at the moment, I gotta get
back to real life <grin>
Post by Albert van der HorstPost by Robert SpykermanInstructions for building in comments.
What do you mean?
In the comments of the xina.asm file, at the top I put the mac
specific command line invocation of the build tools necessary to get a
working binary from the assembly source. Options like -segprot etc for
the linker, that sort of thing.
Robert Spykerman