Subject: Re: storing data in a code segment - ok?
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: port-i386
Date: 10/18/1998 00:28:23
On Sat, Oct 17, 1998 at 11:15:42PM -0400, John F. Woods wrote:
> 
> Do we have any tools for dumping out ELF headers?  

  If you have access to a Linux box, copy /usr/bin/objdump
(part of binutils), and run that on the Linux executables:
objdump-linux --headers <oracle exec>

  Running it on itself (I don't have the oracle stuff) produces output like:
% objdump-linux --headers objdump-linux
objdump-linux:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .interp       00000013  080480d4  080480d4  000000d4  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .hash         00000358  080480e8  080480e8  000000e8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .dynsym       00000730  08048440  08048440  00000440  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
...
  9 .text         0001f1b8  08049a10  08049a10  00001a10  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
...


  Brian
  P.S.  "objdump --disassemble <file>" can be quite handy at times!
-- 
"The nuclei of the rare earth elements look either like watermelons or like
  squashed pumpkins." - Dr. Dunning, PHYS 202