any objdump on solaris ?

Ask a Question related to Sun Solaris, Design and Development.

  1. #1

    Default any objdump on solaris ?

    hi,

    is there any tool like "objdump" on Solaris (8.0 in particular)?
    plz note that my binaries are actually not generated using the
    GNU compiler toolset, but with the SUN Workshop compiler toolset.
    i am wondering if such a thing is possible, i.e. to use objdump
    to disassemble to source. my compilation was done with "-g".

    tia,
    bdutta.
    Banibrata Dutta Guest

  2. Similar Questions and Discussions

    1. (Help) FTP fails in Solaris 9 but not in Solaris 2.6
      Our Sun E3500 server has been upgraded from Solaris 2.6 (105181-17 ) to Solaris 9 (112233-11). There are no changes in any of the FTP binaries. We...
    2. solaris 10 zone / container question (or Solaris 9)
      I begin to look at zoning in Solaris 10. I have not configured zones yet but need some answers quite quick (tomorrow :-() and hope someone can help...
    3. Question: C2 Security Configuration for general Unix and Solaris/Trusted Solaris (Auditing)
      While reviewing the DoD 5200.28-STD "DEPARTMENT OF DEFENSE TRUSTED COMPUTER SYSTEM EVALUATION CRITERIA" document and looking over "Security...
    4. RPC unknown host with Solaris 9 (not on Solaris 8)
      I am trying to see if a Solaris 8 application will work on Solaris 9. While it mostly works, I am still running into issues with RPC. I get error...
    5. upgrading solaris 2.6 to Solaris 8
      Hello, Last day I upgraded my solaris 2.6 to Solaris 8 on a E220R. After reboot the system boots with solaris 8 but ....it got stucks at...
  3. #2

    Default Re: any objdump on solaris ?

    [email]bdutta@hotmail.com[/email] (Banibrata Dutta) writes in comp.unix.solaris:
    |is there any tool like "objdump" on Solaris (8.0 in particular)?

    Depends - what does objdump do? It sounds like it could be similar
    to /usr/ccs/bin/elfdump, which shows all sorts of information about
    ELF binaries.

    |i am wondering if such a thing is possible, i.e. to use objdump
    |to disassemble to source. my compilation was done with "-g".

    Ah. /usr/ccs/bin/dis will disassemble, but I find the Sun cc -S output
    much more useful as it shows the assembly output with comments showing
    what part of the C source it relates to.

    --
    __________________________________________________ ______________________
    Alan Coopersmith [email]alanc@alum.calberkeley.org[/email]
    [url]http://www.CSUA.Berkeley.EDU/~alanc/[/url] aka: [email]Alan.Coopersmith@Sun.COM[/email]
    Working for, but definitely not speaking for, Sun Microsystems, Inc.
    Alan Coopersmith Guest

  4. #3

    Default Re: any objdump on solaris ?

    Alan Coopersmith <alanc@alum.calberkeley.org> writes:
    >bdutta@hotmail.com (Banibrata Dutta) writes in comp.unix.solaris:
    >|is there any tool like "objdump" on Solaris (8.0 in particular)?
    >Depends - what does objdump do? It sounds like it could be similar
    >to /usr/ccs/bin/elfdump, which shows all sorts of information about
    >ELF binaries.

    Or plain /usr/ccs/bin/dump which also shows information abotu
    ELF binaries.

    Casper
    --
    Expressed in this posting are my opinions. They are in no way related
    to opinions held by my employer, Sun Microsystems.
    Statements on Sun products included here are not gospel and may
    be fiction rather than truth.
    Casper H.S. Dik Guest

  5. #4

    Default Re: any objdump on solaris ?

    > >Depends - what does objdump do? It sounds like it could be similar
    > >to /usr/ccs/bin/elfdump, which shows all sorts of information about
    > >ELF binaries.
    >
    > Or plain /usr/ccs/bin/dump which also shows information abotu
    > ELF binaries.
    Thanks, Alan & Casper
    Those were the commands I was looking for (not related to the OP's post)
    I just installed SunOne Directory Server Resource Kit 5.2
    in /opt/sunone which is supposed to be the default dir according
    to the README, (even though the installer defaults to / )
    but all the commands (ldapcompare, ldapcmp, etc) failed
    with various lib*.so not found (confirmed with ldd).

    Obviously a bad precompiled RPATH or a required LD_LIBRARY_PATH.
    I found the libraries in lib/ldapcsdk/lib-private/ but
    the executables (or ld.so.1) are not searching there.

    With "truss" I noticed ../lib and ../../lib were searched.
    Now I can see with elfdump and dump -Lv that RPATH is preset to
    ...:../lib:../../lib:../../../lib:../../../../lib
    obviously nothing with "lib/ldapcsdk/lib-private"

    I made symlinks in /opt/sunone/lib but I guess I could also
    write wrappers that set LD_LIBRARY_PATH to avoid any conflicts
    with future sunone packages. Or Sun can fix the RPATH :-)

    Thanks.

    Oscar


    Oscar del Rio Guest

  6. #5

    Default Re: any objdump on solaris ?


    "Banibrata Dutta" <bdutta@hotmail.com> wrote in message
    news:ccecb365.0308032026.1aad8367@posting.google.c om...
    > Thanks for all the answers (including Tony Walton, which i believe was
    > posted to me alone and not the group). "dis" did the job for me.
    > And comparing it with the output of "cc -S" was the perfect match, as
    > i was able to match instruction to instruction.
    >
    > As far as the GNU binutils are concerned, i think due to the difference
    > in format of binaries generated by SunWorkshop CC compiler and GCC/G++
    > compiler, the gnu tool set doesn't work on Sun CC compiled libs/bins.
    If you're having problems using the binutils on these binaries you're
    looking at bugs. The binaries generated by both Sun One and Gcc are simple
    ELF files (which is perhaps the most widespread and well documented binary
    file format outside the windows world). From our Solaris 8 machine with
    binutils compiled with Sun Workshop:

    $ ./binutils/readelf -d binutils/objdump

    Dynamic segment at offset 0x14e428 contains 23 entries:
    Tag Type Name/Value
    0x00000001 (NEEDED) Shared library: [libc.so.1]
    0x6ffffffe (VERNEED) 0x1e278
    0x6fffffff (VERNEEDNUM) 1

    $ ./binutils/objdump -d binutils/objdump | head -40

    binutils/objdump: file format elf32-sparc

    Disassembly of section .init:

    0001ecb0 <_init>:
    1ecb0: 9d e3 bf a0 save %sp, -96, %sp
    1ecb4: 40 00 00 03 call 1ecc0 <_init+0x10>
    1ecb8: 01 00 00 00 nop
    1ecbc: 00 14 f6 3c unimp 0x14f63c
    1ecc0: d0 03 e0 08 ld [ %o7 + 8 ], %o0
    1ecc4: 90 03 c0 08 add %o7, %o0, %o0
    1ecc8: e0 02 3f f8 ld [ %o0 + -8 ], %l0
    1eccc: e2 02 3f f0 ld [ %o0 + -16 ], %l1
    1ecd0: 80 a4 00 00 cmp %l0, %g0
    1ecd4: 02 80 00 04 be 1ece4 <_init+0x34>
    1ecd8: 01 00 00 00 nop
    1ecdc: 9f c4 00 00 call %l0
    1ece0: 01 00 00 00 nop
    1ece4: 80 a4 40 00 cmp %l1, %g0
    1ece8: 02 80 00 04 be 1ecf8 <_init+0x48>

    Cheers,
    Shaun



    Shaun Clowes Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139