Re: About ELF format (Vinay)
11 Jun 2004 14:13:01 -0400

          From comp.compilers

Related articles
About ELF format (2004-05-30)
Re: About ELF format (George Huber) (2004-06-06)
Re: About ELF format (Jie Zhang) (2004-06-06)
Re: About ELF format (Tim Bauer) (2004-06-06)
Re: About ELF format (2004-06-11)
Re: About ELF format lod@egobolinu.xorg (Lode) (2004-09-21)
| List of all articles for this month |

From: (Vinay)
Newsgroups: comp.compilers
Date: 11 Jun 2004 14:13:01 -0400
References: 04-05-098 04-06-010
Keywords: linker
Posted-Date: 11 Jun 2004 14:13:01 EDT

Hi Tim

Your analysis is same as mine. The reason for that 12 byte offset is
still a mistry. I compiled a simple .c file, with just a main function
and a printf inside it.

But I found that this 12 bytes offset is seen when compiled on Red Hat
7.2(GCC 2.96)!! On 9.0(gcc 3.2.2) its perfect!! So I need to know why
GCC 2.96 added that extra 12 bytes.

> - Did any tool or utility touch the file?
        No , I did not touch the file at all.

> - How did you generate the hex dump? It is doubtful that it is off, but I
> am at a loss
          I used a hex editor(UltraEdit) to read the hex dump.
> - Does the executable function?
      On RH7.2 it does work!!
> - Try running "readelf" on it. Expect an immediate fatal.
          Readelf on 7.2 interprets the executable correctly. But the
readelf on 9.0 hangs when it tries to interpret the executable
compiled on 7.2 :-)

> Do you have the source file used to generate this?
    Its just a simple c file with a main function and a printf inside it.
> Which gcc version?

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.