flat assembler
Message board for the users of flat assembler.
Index
> Unix > fasm under FreeBSD |
Author |
|
scientica 07 Oct 2003, 05:11
Are you sure you have execution permision? try do type something like
chmod 777 /usr/bin/fasm (you might have to su if you installed fasm as root) _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
07 Oct 2003, 05:11 |
|
pthien 07 Oct 2003, 12:42
Yep, I have the necessary permission.
|
|||
07 Oct 2003, 12:42 |
|
scientica 07 Oct 2003, 13:11
pthien wrote: I don't know which version of fasm the latest PureBasic for Linux compiler comes with, I was going to try the one from this web site tomorrow. Unless someone has another suggestion. type: less /usr/bin/fasm y [end key] You should see something like: Code: can you see the line "flat assembler version 1.49", what version dos it say for you? (If it's not 1.49 I'd recomend that you update). _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
07 Oct 2003, 13:11 |
|
pthien 09 Oct 2003, 12:59
% file fasm
fasm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linkedfile: corrupted section header size. This is the output on a FreeBSD machine. I'll try a Red Hat 9 machine today. I don't know if FreeBSD isn't interpreting something correctly, or if there is indeed a problem in the header for fasm. Feel free to jump-in any time if you have any input. Thanks, Phil |
|||
09 Oct 2003, 12:59 |
|
scientica 09 Oct 2003, 15:38
this is my output when using file:
Code: [root@centralplexus mnt]# file /usr/local/bin/fasm-1.49/fasm /usr/local/bin/fasm-1.49/fasm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linkedfile: corrupted section header size. But, Fasm works for me. (I'm using RedHAt8, and just compiled and installed hte 2.4.22 kernel, no problems. (not with the old kernel, 2.4.2-18(<-iirc))) _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
09 Oct 2003, 15:38 |
|
Tomasz Grysztar 13 Oct 2003, 08:55
For "ELF executable" fasm doesn't generate any section headers (only program headers), as ELF specification says they are not needed in such case - so this is probably the reason of that message. But I don't know if it's related in any way to your problem with executing that executable in FreeBSD. But as PureBasic uses fasm's ELF object format output, this problem won't probably occur with any of your programs compiled with it.
|
|||
13 Oct 2003, 08:55 |
|
bazik 23 Oct 2003, 09:28
If you want to find out the version of your used fasm, run
`strings /usr/bin/fasm | grep version` |
|||
23 Oct 2003, 09:28 |
|
Tomasz Grysztar 29 Oct 2003, 22:32
pthien, can you check for me whether this problem is related to program headers put above the first 4 KB of file? If the "hello" example is working for you, add something like "times 4096 nop" at the end of its code, recompile it and check whether it's still working.
You may also try the latest prerelease version (it's posted in the "Main" forum) - I've redesigned the ELF executable formatter a bit, maybe that helps... |
|||
29 Oct 2003, 22:32 |
|
pthien 05 Dec 2003, 19:35
Sorry it has taken so long to try this. I only had SuSE loaded, so I had to wait to try FreeBSD until I had another machine I could test.
Anyway, I tried the prerelease today and it still doesn't work in FreeBSD 5.1. I get: ./fasmnew: Exec format error. Binary file not executable when I do a "file fasmnew" I get: fasmnew: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked file: corrupted section header size. I did a brandelf to change the type to Linux, but still it doesn't run. I will attempt the suggestion above of adding the noop at the end of the code to see if my helloworld.pb program breaks on FreeBSD. I should be able to test faster now that I have a second PC to run FreeBSD on. Thanks, Phil |
|||
05 Dec 2003, 19:35 |
|
Tomasz Grysztar 06 Dec 2003, 02:19
That's strange, because I no longer get the "corrupted section header size" message when I do "file fasm" under Linux. Just to make sure, here's the prerelease I'm testing.
(I forgot to tell you that you need to recompile Linux version with the prerelease version first, perhaps you have compiled it using the old version?) |
|||
06 Dec 2003, 02:19 |
|
pthien 06 Dec 2003, 16:10
Woops, sorry about that. I was trying a previous prerelease (fasm-1.49.9.5*, I believe). Anyway, I downloaded fasm-1.49.9.7.tar.gz and ran is on FreeBSD and (drum roll please...) SUCCESS!!! It runs! I haven't compiled any code with it yet, but yes, it DOES execute.
I did have to do a "brandelf -t Linux fasm" to get FreeBSD to execute it. I wonder whether that will be a problem with code it generates. Is it advisable to have it generate a header that indicates Linux instead of SYSV? Or is there a reason to have the header say SYSV instead? Otherwise I suppose those of us using it on FreeBSD will have to use a script that does a "brandelf" at the end. Thanks for your help! -Phil |
|||
06 Dec 2003, 16:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.