| Summary: | Can't build a.out binaries | ||
|---|---|---|---|
| Product: | Base System | Reporter: | trost <trost> |
| Component: | i386 | Assignee: | David E. O'Brien <obrien> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed You aren't quite understanding the binary creation process. ``cc -aout'' works in that it generates an a.out object module. In order to create an a.out binary (as with an ELF binary), you need to have the crtX.o and libc, etc. as a.out versions also. A.out versions of CSU and standard libraries do not come with FreBSD by default. You need to build an a.out crt0.o using ``cc -aout'' first along with any libraries you will need. Responsible Changed From-To: freebsd-bugs->obrien I'm mr. toolchain. |
If you specify "-aout" on the cc command line, you get the error message "ld: crt0.o: No such file or directory" (or c++rt0.o if -shared is specified). Fix: Got me -- I don't understand the a.out magic well enough to start diagnosing it. If I remove crt.o from the ld command line, ld then complains about libgcc.a having bad magic -- presumably it is using the wrong library. How-To-Repeat: $ echo 'main() {print("Oh, Hell World.\n");}' > foo.c $ cc -aout foo.c