DLL tools...

DLL tools...

Post by Jason Van Patt » Thu, 14 Sep 1995 04:00:00



Hi -

        Anyone out there familiar with the DLL tools that are found on sunsite?
I'm trying to put together a shared lib, and I'm having trouble with the
mkimage part.

        I put together a small C file, say something silly like this:

#include <stdio.h>

void jprint (char *string)
{
        printf("%s\n",string);
        return;

Quote:}

        jprint() being the only function in my library.  Now, I compile it
using gcc -B/usr/bin/jump func.c -c  and get the jump.log file.  I split the
log file up using getvars and getfuncs (and getsize.)  Now, I go back to my
object file and do this:

mkimage -l libjlib -v1.0 -a 0x80000000 -g 0x4000 -- func.o \
        `gcc --print-libgcc-file-name` -lc

        and mkimage complains about mulitple definitions of jprint.

        I guess I have a number of questions, for anyone that can answer them.
First, how does one know what to use for the -a, -g, and -j switches?  Do you
just guess?  Secondly, does anyone see what I'm doing wrong here?

        I've read the readme.ps that came with the tools.  A good portion of it
went right over my head, unfortunately.  But, I think I'm following the
directions correctly.  Could some kind soul point me in the right direction?
And please, don't say "Use ELF."  

        Respond either by posting or email.  Thanks.

                                                Jason

--
Jason Van Patten                  | If at first you don't succeed, keep |
Clarkson University               | on sucking till you do suck seed.   |

  Any opinions expressed here are actually yours, you just don't know it, yet.

 
 
 

DLL tools...

Post by Wolfram Glog » Thu, 14 Sep 1995 04:00:00



Quote:>    jprint() being the only function in my library.  Now, I compile it
>using gcc -B/usr/bin/jump func.c -c  and get the jump.log file.  I split the
>log file up using getvars and getfuncs (and getsize.)  Now, I go back to my
>object file and do this:
>mkimage -l libjlib -v1.0 -a 0x80000000 -g 0x4000 -- func.o \
>    `gcc --print-libgcc-file-name` -lc
>    and mkimage complains about mulitple definitions of jprint.

Hmm, have you actually recompiled func.o after having determined the
proper jump.funcs/vars files ?  Once you have those, you need to
issue the compile command once more (the output func.o _will_ be
different than before, when you compiled w/o the jump.* files !)
And you should set the env. variable 'JUMP_DIR' to '.' (or
whereever your jump.* files live) before recompiling.

OTOH, it could just be that jprint is already defined in libc.

Quote:>    I guess I have a number of questions, for anyone that can answer them.
>First, how does one know what to use for the -a, -g, and -j switches?  Do you
>just guess?  Secondly, does anyone see what I'm doing wrong here?

-a needs to be a unique starting address to avoid clashes with
other libs.  0x80000000 is a good value for experimentation.
-g is the size of the global offset table (limiting the number
of functions and/or global variables in your lib).  0x4000 is
plenty...  Except for the need to recompile you're not doing anything
wrong, as far as I can see.

Quote:>    I've read the readme.ps that came with the tools.  A good portion of it
>went right over my head, unfortunately.  But, I think I'm following the
>directions correctly.  Could some kind soul point me in the right direction?
>And please, don't say "Use ELF."  

I'm not :-).

Regards,

Wolfram.

 
 
 

1. Linux DLLs tools-2.16

I've just downloaded tools-2.16.tar.gz - is this _really_ the way people
make DLLs for Linux?  Sigh.  Maybe I wait till Linux goes ELF...  Be easier
to maintain our two versions, then.

[I downloaded tools-2.16.tar.gz; I can use these tools to build a DLL that is
not affected by the GPL under which the tools are distributed.  At least,
I'm pretty sure I can.  (Someone else thinks it's okay, as their ad is
included.)]

-- Peter
--
Drealm Conference System -- (+44) 181 568 2204
---- Subscriber lines available up to VFC ----

2. Virus protection software

3. DLL Tools & gdb problem

4. Linux installation and NCR SCSI controller, PCI (chip 53c810)

5. DLL tools for Linux

6. ipmasqadm portfw

7. DLL-TOOLS - Problems building libXm.so.2.0.0

8. Flatfish's anti-matter clone?

9. dll tools 2.11 or greater

10. Looking for dll tools

11. DLL tools for Linux

12. HELP: Problem with DLL tools

13. DLL tools 2.11 or greater