Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi,
this is my first post.i want to know as to how do i see the source code for programs compiled in gcc .there is a command but i am not getting it .could anyone help me out.
bye
You'd need a disassembler. Once code has been compiled it's no longer 'human-readable' because it's in binary (or can be viewed as hex). A disassembler or decompiler would give you some idea of the source code, but it wouldn't be as the programmer wrote it, it would be a 'best guess' of the disassembler. If you want source code, most linux programs provide it.
Search for dasm2. I'm not sure what you're hoping to gain from this...it's only going to give you a whole load of assembly language that'll be incredibly difficult to understand.
my aim is just to optimize the code when there are memory constraints,and by looking at assembly i hope to get an idea of writing efficent programs.
thx
bye
my aim is just to optimize the code when there are memory constraints,and by looking at assembly i hope to get an idea of writing efficent programs.
thx
bye
Well you're not going to learn that from disassembled code. You're better of reading a book about optimising assembly language or joining some forums/newsgroups. Disassembled code isn't going to be optimised or efficient, even if it was originally written that way because when the code was compiled certain things may have happened to it (like loops being unrolled) that are not how the programmer originally wrote it. In short even a program written in assembly language will look different once it's been compiled and disassembled.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.