Find the answer to your Linux question:
Results 1 to 2 of 2
Hello! I have an object file jb.o (loadable module actually), but I don't have any source for it. I just have binary file. When I link my code with it ...
  1. #1
    Just Joined! rostfrei's Avatar
    Join Date
    Oct 2006
    Posts
    17

    help: Stripping object file

    Hello!

    I have an object file jb.o (loadable module actually), but I don't have any source for it. I just have binary file. When I link my code with it I get some linker errors for the symbols I know I won't need. Is there some way of stripping the object file (erasing part of the code) that deletes calls to these functions? Or maybe I could write empty functions and insert them into the object file? I know I can strip the object file, but these only removes symbol names (strings) from the code and not the actual code.

    Best regards,

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    If telling the linker to ignore errors for unresolved symbols would be acceptable, then perhaps some of the options noted in man ld may be useful ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

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