flat assembler
Message board for the users of flat assembler.
Index
> Linux > is elf format compitable with native linux elf format? |
Author |
|
Tomasz Grysztar 28 Oct 2003, 12:57
strip is a tool designed to remove the unnecessary information from object files - these are the ones with section header table (check it out in the ELF specification, you can find it here: http://www.skyfree.org/linux/references/ELF_Format.pdf), and the format generated by "format ELF executable" directive doesn't contain section table, only the program header table (and according to that specification it's completely valid, as for the "execution view" section table is marked as optional), and this probably confuses the "strip" tool, as it is not valid "object" file this way. Having one common format for both objects and executables initially seemed to me to be a nice idea, but now I see it only emerges problems - as many programs are doing false assumptions about the ELF files, like it's in this case. Also the "file" command informs about the "corrupted section header size" on such files (as it is set to zero, because there's no section header in fasm-generated executable). But, once again: according to the ELF specification there is no need to include section header table in the executable file!
And the "strip" would be anyway completely unuseful for you in case of fasm-generated ELF executables, as they only contain information that is really needed for program execution. |
|||
28 Oct 2003, 12:57 |
|
Tomasz Grysztar 29 Oct 2003, 18:05
Anyway it turned out that the behaviour of "file" command with fasm-generated executables can be fixed by simply setting the size of section entry to a valid value (but with count of entries still equal to 0, though), you try, I've updated the latest prerelase with it. But I cannot do anything about the strange behaviour of "strip" program - it is assuming that the given file is object file, even when it's marked in header as executable - and removing everything that doesn't belong to any section from such file ends up with just destroying it. I really don't know why "strip" is doing it even when the file is obviously not object, as it has no section headers at all.
|
|||
29 Oct 2003, 18:05 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.