Find the answer to your Linux question:
Results 1 to 2 of 2
You have 2 write two shared object files. suppose 1.so and 2.so each hv 2 functions f1(char*) and f2(). Write a main prog such dat it takes 2 arguments say ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    1

    Shared objects


    You have 2 write two shared object files. suppose 1.so and 2.so each hv 2 functions f1(char*) and f2().
    Write a main prog such dat it takes 2 arguments say '1' & '2'. In this case the 1.so must get linked dynamically and call f1 (char*) - which is present in 1.so file (coz '1' is da first parameter) and '2' must be passed to it (which is present as a second command line parameter for main). Now f1(char *) should dynamically link 2.so and call f2() from it.

    If the commandline parameters are '2' & '1' den in dat case 2.so must get linked dynamically and call f1(char*) - which is present in 2.so file (coz '2' is da first parameter) and '1' must be passed to it(which is present as a second command line parameter for main ). Now f1(char *) should dynamically link 1.so and call f2() from it.

    Give me 3 source files and 3 make files.

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    Posting homework questions is against forum rules.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •