M3 Operating System Development

A chronicle of the development of the M3 operating system

Useful Linux Commands for Operating System Development

leave a comment »

As I was attempting to figure out what was going on with my C kernel and my “missing” strings. I happened upon some rather useful linux commands for examining and debugging object files, so I thought I would share them here.

nm – print names from object file

strings – dump ASCII strings from object file. It’s interesting to run this command on other binaries to see what they contain. This command gives you an excellent reason as to why you shouldn’t embed sensitive information in your application as plaintext. Seeing such text is a simple command away for anyone that might have malicious intent with your code.

xxd – dumps contents of a binary file – gives you a hexdump – shows you what address information can be found at within your binary.

objdump – displays information about object file.

All of these commands have many command-line options, which you can see if you click on the command names above. For me, these have already proved useful, because they allowed me to determine whether my “missing” strings were actually in my kernel binary or not. I can see them providing similar help in the future, as kernel development progresses.

Advertisements

Written by m3os

March 21, 2009 at 10:34 am

Posted in Random

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: