Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-28-2010, 10:34 PM   #1
Registered: Oct 2006
Location: New Jersey (US)
Distribution: Arch Linux
Posts: 58

Rep: Reputation: 15
Unhappy Binary file: Does this look like a link list?

Hello all,

I was hope someone can help me figure out what these, what appears to be, pointer addresses. The file was generated by a program called DVdraw which is part of DataViews. This is a very old version that was generated on a Sparc 20. So I assume the file is Big-Endian.

I generated a small binary file and added records using the DVdraw app. This is the hex output of the first record.

Records seem to start with
00 00 01 BC
As you can see in Offset 81H, you see
15 1D E8 00
and next to it
00 00 00 00
, which to me tells DVdraw that there are no more records. (I could be wrong about the offset, it may start at Offset 80H, but you still have 00 00 00 00 at Offset 84H). At Offset 9CH, it's a byte and tells DVdraw the label's length (starting at Offset 9DH).

Here it is with two records. As you can see, the contents of Offset 85H has been replaced to "point to" the second record (Offset C2H) and at Offset C6H is 0's. Again, I could be off by one location.

Here it is with three records.

So there is a pattern but I can't figure this part out. I hope someone can throw out some suggestions. I have no idea how to predict the next "address".
Old 01-29-2010, 01:48 AM   #2
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
it seems that they are placed inside pairs.

one_record.png: 15 1d e8 00 -> 15 1d e8 00
two_records.png: 15 1d e8 00 -> 15 1d e8 00, 16 36 80 00 -> 16 36 80 00
three_records.png: 15 1d e8 00 -> 15 1d e8 00, 16 36 80 00 -> 16 36 80 00, 16 3f f0 00 -> 16 3f f0 00,

on three_records.png you forgot to highlight the starting 15 1d e8 00. got any bells ring to it?

edit: maybe you just have to iteratively search all pairs until you find 00 00 00 00.

Last edited by konsolebox; 01-29-2010 at 01:53 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with Link List new2lunix Programming 10 01-09-2009 05:14 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
make link to binary file mfran2002 Linux - Newbie 3 07-24-2007 02:24 PM
? A list of every existing (binary) Linux system command? GrapefruiTgirl Linux - General 3 05-25-2007 07:54 PM
Bash File Name Matching - Binary file .ogg matches !!! maxvonseibold Linux - General 8 01-30-2007 06:31 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration