Re: Problem mit Variablendekleration

Michael Armbrecht <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Am Montag, 20. Juni 2005 22:16 schrieb Philipp Otte:
> Hi,
> ich habe folgendes Problem. Ich schreibe ein Programm, dass den
> ELF-Header einer ELF-Datei ausliest.
> Das Programm liegt aufs Problem gestutzt als Anhang dabei.
> Dabei gibt mir der gcc folgende Fehlermeldung aus:
>
> philipp@philipp:~$ gcc -o elftest elftest.c
> elftest.c: In Funktion »main«:
> elftest.c:8: error: storage size of `header' isn't known
> elftest.c:13: error: invalid application of `sizeof' to an incomplete
> type

Ich habe mit Google das hier gefunden:
http://infamous.hackaholic.org/r_elf_c.html
Wohl auch ein Programm, das ELF-Header liest. 


> Wieso weiß der gcc nicht, wie groß Elf32_Ehdr ist?

Sieht so aus, als müsste man ihm das per
#define ELF_HS		52	//size of the elf header, always fixed, always at start of 
exe

erst verklickern.

Michael

-- 
Once, adv.:
	Enough.
		-- Ambrose Bierce, "The Devil's Dictionary"

-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.