interpreting "blanks" or "trampolines" ?

David Young <[email protected]> Fri, 14 Feb 2003 17:07:47 -0600
Newsgroups gmane.network.wireless.bsd.general
Message-ID <[email protected]>
I am examining what I think is a loadable kernel module for Linux to find
out some "magic" I need to write to registers in ADMtek's wireless chip.

Many procedure calls are obscured by a peculiar 'call' instruction which I
guess marks a "blank" for the linker/loader to fill from the symbol table.
Each "blank" is a 'call' instruction whose target is the byte immediately
following the beginning of the 'call' instruction.

Is there a way to fill in the blanks? It will make the disassembled
procedures a lot easier to interpret.

Here is an example procedure. I have concealed the name of the
procedure. See the 'call' instructions?

(gdb) disassemble ZZZZZZZZZZZZ 
Dump of assembler code for function ZZZZZZZZZZZZ:
0x3380 <ZZZZZZZZZZZZ>:  push   %edi
0x3381 <ZZZZZZZZZZZZ+1>:        push   %esi
0x3382 <ZZZZZZZZZZZZ+2>:        push   %ebx
0x3383 <ZZZZZZZZZZZZ+3>:        mov    0x18(%esp,1),%ecx
0x3387 <ZZZZZZZZZZZZ+7>:        mov    0x10(%esp,1),%eax
0x338b <ZZZZZZZZZZZZ+11>:       or     0x14(%esp,1),%ecx
*snip snip*
0x33b7 <ZZZZZZZZZZZZ+55>:       call   0x33b8 <ZZZZZZZZZZZZ+56>
0x33bc <ZZZZZZZZZZZZ+60>:       add    $0xc,%esp
0x33bf <ZZZZZZZZZZZZ+63>:       jmp    0x33e1 <ZZZZZZZZZZZZ+97>
0x33c1 <ZZZZZZZZZZZZ+65>:       lea    0x0(%esi),%esi
0x33c4 <ZZZZZZZZZZZZ+68>:       push   $0x2
0x33c6 <ZZZZZZZZZZZZ+70>:       call   0x33c7 <ZZZZZZZZZZZZ+71>
*snip snip*
0x33ec <ZZZZZZZZZZZZ+108>:      pop    %ebx
0x33ed <ZZZZZZZZZZZZ+109>:      pop    %esi
0x33ee <ZZZZZZZZZZZZ+110>:      pop    %edi
0x33ef <ZZZZZZZZZZZZ+111>:      ret    
End of assembler dump.

-- 
David Young             OJC Technologies
[email protected]      Engineering from the Right Brain
                        Urbana, IL * (217) 278-3933
--
*bsd wireless list, a bawug thing <http://www.bawug.org/>
[un]subscribe: http://lists.bawug.org/mailman/listinfo/bsd-wireless/