Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.misc > #1853
| From | Paul Edwards <mutazilah@gmail.com> |
|---|---|
| Newsgroups | comp.os.os2.programmer.misc |
| Subject | Re: loader |
| Date | 2024-02-24 16:30 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <urc9ed$13job$1@dont-email.me> (permalink) |
| References | <ur1mqi$2ddfu$1@dont-email.me> <urc5jb$12sfb$1@dont-email.me> <urc6so$133ut$1@dont-email.me> |
On 24/02/24 15:46, Paul Edwards wrote:
> Still doesn't get me the required internal fixups.
Got it!
https://open-watcom.github.io/open-watcom-v2-wikidocs/lguide.html
The INTERNALRELOCS Option
Formats: OS/2
The "INTERNALRELOCS" option is used with LX format executables under
32-bit OS/2. By default, OS/2 executables do not contain internal
relocation information and OS/2 Dynamic Link Libraries do contain
internal relocation information. This option causes the Open Watcom
Linker to include internal relocation information in OS/2 LX format
executables.
The format of the "INTERNALRELOCS" option (short form "INT") is as follows.
OPTION INTERNALRELOCS
Not documented here:
D:\devel\pdos_minimal\xxx>wlink /? | grep -i int
export ::=
entryname["."ordinal]["="internal]["RESident"]["PRIVATE"][iopl]
export ::= entryname["."ordinal]["="internal]["RESident"]["PRIVATE"]
export ::= entryname["."ordinal]["="internal]["PRIVATE"]
D:\devel\pdos_minimal\xxx>
But it works:
wlink File os2test.obj,os2test2.obj Name os2test.exe Form os2 flat
PMCompatible Library os2.lib Option
quiet,start=_os2test,stub=needpdos.exe,internalrelocs
And my executable is 8 bytes bigger:
D:\devel\pdos_minimal\xxx>hexdump os2test.exe
000000 4D5A7C00 01000000 04004100 FFFF0400 MZ|.......A.....
000010 00040000 00000000 40000000 00000000 ........@.......
000020 00000000 00000000 00000000 00000000 ................
000030 00000000 00000000 00000000 80000000 ................
000040 0E1FB409 BA1000CD 21B001B4 4CCD2100 ........!...L.!.
000050 54686973 2070726F 6772616D 206E6565 This program nee
000060 6473204F 532F3220 322E3020 6F722065 ds OS/2 2.0 or e
000070 71756976 616C656E 740D0A24 00000000 quivalent..$....
000080 4C580000 00000000 02000100 00000000 LX..............
000090 10020000 02000000 01000000 00000000 ................
0000A0 03000000 00080000 00100000 00000000 ................
0000B0 2A000000 00000000 64000000 00000000 *.......d.......
0000C0 C4000000 03000000 0C010000 00000000 ................
0000D0 1C010000 00000000 1C010000 27010000 ............'...
0000E0 00000000 00000000 28010000 34010000 ........(...4...
0000F0 48010000 01000000 51010000 00000000 H.......Q.......
000100 D4010000 00000000 00000000 00000000 ................
000110 00000000 02000000 00000000 00000000 ................
000120 00000000 00000000 00000000 00080000 ................
000130 00000000 00000000 00000000 00000000 ................
000140 00000000 28000000 00000100 05200000 ....(........ ..
000150 01000000 01000000 00000000 0C000000 ................
000160 00000200 03200000 02000000 01000000 ..... ..........
000170 00000000 00080000 00000300 03200000 ............. ..
000180 03000000 00000000 00000000 00000000 ................
000190 27000000 27000000 0A000000 076F7332 '...'........os2
0001A0 74657374 00000000 00000000 14000000 test............
0001B0 14000000 08011000 011A0108 811C0001 ................
0001C0 EA070009 00020000 08444F53 43414C4C .........DOSCALL
0001D0 53000000 83EC0489 E0506A09 68000002 S........Pj.h...
0001E0 006A01E8 00000000 83C4106A 006A01E8 .j.........j.j..
0001F0 00000000 83C40883 C404C368 690D0A61 ...........hi..a
000200 62630D0A 00 bc...
And now I can see both the x'07' and the x'09' here:
0001C0 EA070009 00020000 08444F53 43414C4C .........DOSCALL
So that reads:
07h = 32-bit Offset fixup (32-bits).
00h = Internal reference.
0009 = SRCOFF = DW
02 = object index (apparently data)
0000 = offset in the data - my string starts at offset 0
so you don't get to see a nice value there.
BFN. Paul.
Back to comp.os.os2.programmer.misc | Previous | Next — Previous in thread | Next in thread | Find similar
loader Paul Edwards <mutazilah@gmail.com> - 2024-02-20 16:10 +0800
Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-20 17:45 -0700
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-21 10:51 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 06:14 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 11:38 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 15:24 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 15:46 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 16:30 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 23:30 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 23:28 +0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-26 06:56 +0800
Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-27 15:41 -0700
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-28 12:50 +0800
Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 14:04 -0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-29 06:56 +0800
Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 19:11 -0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-29 11:46 +0800
Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 23:02 -0800
Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-03-01 07:15 +0800
Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 14:20 -0800
Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 13:52 -0800
Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-28 17:43 -0700
csiph-web