brianm@sco.COM (Brian Moffet) (03/28/89)
I noticed the other day that the distance between shared library functions is 6 bytes. The is at an offset less than the base of the Shared Library pointer. I would like to know, why 6 bytes? 4 of these bytes should be the pointer itself, but what are the other 2? flags? thanks much brian moffet -- Brian Moffet {uunet,decvax!microsoft,ucscc}!sco!brianm -or- ...sco!alar!brian "I was everything you wanted me to be. You were afraid, I was frightening." My fish and company have policies. I have opinions.
news@oberon.USC.EDU (USENET News) (03/29/89)
In article <2486@scolex.sco.COM> brianm@sco.COM (Brian Moffet) writes: >I noticed the other day that the distance between shared >library functions is 6 bytes. The is at an offset less than >the base of the Shared Library pointer. I would like to know, >why 6 bytes? 4 of these bytes should be the pointer itself, >but what are the other 2? flags? The other two bytes are the jump instruction which is necessary to transfer control to the actual library routine (which has an unknown length). In other words, your program will need to execute the instruction which in assembly language has the form: ... jsr _LVOWhatever(a6) ;invoke whatever ... which then transfers control to the library stubs, which have a form like: ... _LVFoo: jmp _Foo _LVWhatever: jmp _Whatever _LVBar: jmp _Bar ... And, as it happens, the jmp instruction occupies two bytes. Raul Miller | USENET: raulmill@aludra.usc.edu | U.S.SNAIL: 721 E Windsor #4 | 55 mph = 82 nc GLENDALE CA 91205 |
jesup@cbmvax.UUCP (Randell Jesup) (03/29/89)
In article <2486@scolex.sco.COM> brianm@sco.COM (Brian Moffet) writes: >I noticed the other day that the distance between shared >library functions is 6 bytes. The is at an offset less than >the base of the Shared Library pointer. I would like to know, >why 6 bytes? 4 of these bytes should be the pointer itself, >but what are the other 2? flags? JMP address.L -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
nichiren@glyph.UUCP (Andy Heffernan) (03/29/89)
Someone else will slip this in before me, but I'm a weasel. In article <2486@scolex.sco.COM> brianm@sco.COM (Brian Moffet) writes: > I noticed the other day that the distance between shared > library functions is 6 bytes. The is at an offset less than > the base of the Shared Library pointer. I would like to know, > why 6 bytes? 4 of these bytes should be the pointer itself, > but what are the other 2? flags? They are the 680x0 JMP instruction, $4EF9. You do a lib call with something like: jsr $fdd8(a6) which lands you into your jump table. From there, this: jmp $2032ea will get you to your library function. Empiricism is fun, no? > Brian Moffet {uunet,decvax!microsoft,ucscc}!sco!brianm > -or- ...sco!alar!brian A.Heffernan, weasel-at-large -- ------------------------------------------------------------------------- Andy Heffernan uunet!glyph!nichiren [1222 - 1282] -------------------------------------------------------------------------