automake - Makefile.am - ELF output
automake - Makefile.am - ELF output
How can i make a Makefile.am that outputs a ELF or flat binary file.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
This is an interesting test case for the RTFM and STFW thread a little while back.
Lets sit back and watch!
-JL
[ON TOPIC] To make an ELF (under Linux, idk about other places):
gcc test.c -o test
or, under 64bit to make a 32 bit version: Add -m32 flag.
IIRC, to make a flat binary, you need to use ld or another linker), am I right?
-JL
Lets sit back and watch!
-JL
[ON TOPIC] To make an ELF (under Linux, idk about other places):
gcc test.c -o test
or, under 64bit to make a 32 bit version: Add -m32 flag.
IIRC, to make a flat binary, you need to use ld or another linker), am I right?
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: automake - Makefile.am - ELF output
Read the manual.engine252 wrote:How can i make a Makefile.am that outputs a ELF or flat binary file.
i have read the manual and now i added the line
format=elf
but now i only get a kernel.o file
if i rename this file to kernel.bin and load it with grub i get
unsupported file format
i guess i have to link it but don't know how to tell it to automake
i'd like to use automake for my little OS development project so if someone can get me started.
thx in advance.
format=elf
but now i only get a kernel.o file
if i rename this file to kernel.bin and load it with grub i get
unsupported file format
i guess i have to link it but don't know how to tell it to automake
i'd like to use automake for my little OS development project so if someone can get me started.
thx in advance.
- Steve the Pirate
- Member
- Posts: 152
- Joined: Fri Dec 15, 2006 7:01 am
- Location: Brisbane, Australia
- Contact:
OP: Since I'm assuming you're using gcc, remove the -c flag so that the kernel actually gets linked. Read the manual (for GCC, since I really doubt this is an automake issue).
I tried autoconf/automake once, ditched automake (since I'd made a much more flexible, non-recursive Makefile.in) and (partly) stuck with autoconf. Though ./configure is pretty bloated, it's preferable for compiler detection and since I compile my OS to 3 different architectures, it allows me to work on, compile, and test any of the 3 versions at the same time.
I tried autoconf/automake once, ditched automake (since I'd made a much more flexible, non-recursive Makefile.in) and (partly) stuck with autoconf. Though ./configure is pretty bloated, it's preferable for compiler detection and since I compile my OS to 3 different architectures, it allows me to work on, compile, and test any of the 3 versions at the same time.
"Sufficiently advanced stupidity is indistinguishable from malice."