Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my specific case ,I want to use it to dump what I echo.

I don't want to involve any file...

Is there a way to make objdump read from stdin instead?

share|improve this question
    
Could you please explain your situation a little more? –  quanta Nov 9 '11 at 3:36

1 Answer 1

you can always do

objdump -d /dev/stdin < t2.o

or

cat t2.o | objdump -d /dev/stdin

sample

[root@myhost cc]# objdump -h /dev/stdin < t2.o

/dev/stdin: file format elf64-x86-64

Sections: Idx Name Size VMA LMA
File off Algn 0 .group 00000008 0000000000000000 0000000000000000 00000040 2**2 CONTENTS, READONLY, EXCLUDE, GROUP, LINK_ONCE_DISCARD

share|improve this answer
    
cat t2.o | objdump -d /dev/stdin does not work. /dev/stdin only works when it corresponds to a real file. Since your solution requires the presence of that file, this does not answer the OP. –  dragonroot Nov 9 '12 at 5:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.