| Summary: | Fix to build 'a.out' binary. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | yakisoba <yakisoba> | ||||
| Component: | gnu | Assignee: | Ceri Davies <ceri> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.0-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->obrien Over to GCC maintainer. Responsible Changed From-To: obrien->freebsd-bugs State Changed From-To: open->feedback Does this problem still exist? Is it useful to keep this PR open now that a significant amount of time has elapsed since FreeBSD switched to using ELF? State Changed From-To: feedback->closed Feedback timeout (6 months or more). I will handle any feedback that this closure generates. Responsible Changed From-To: freebsd-bugs->ceri Feedback timeout (6 months or more). I will handle any feedback that this closure generates. |
After the base compiler is upgraded to GCC 2.95.2, 'a.out' binary could not build. CURRENT and 4.0-STABLE GCC Target Macro still support both 'ELF' and 'a.out'. So this problem is bug ? Or switch to 'ELF' only soon ? If fix now, correct '__main.o' in libgcc.a like below. a.out __main.o: ELF __main.o: U ___CTOR_LIST__ U ___DTOR_LIST__ 00000028 T ___do_global_ctors 00000000 T ___do_global_dtors 0000007c T ___main U __exit_dummy_decl 000000a4 D __exit_dummy_ref U _atexit P.S. Now 'ELF' has garbege. ELF __main.o: U __do_global_ctors 00000000 T __main Fix: 1. Delete define 'INVOKE__main' in GCC Target Macro 'i386/freebsd.h'. 2. Add the next line to GCC Target Macro 'i386/freebsd.h'. #if defined (IN_LIBGCC2) && !defined (__ELF__) #undef OBJECT_FORMAT_ELF #undef INIT_SECTION_ASM_OP #endif 3. Add CFLAGS to 'gnu/lib/libgcc/Makefile'. CFLAGS+= -DIN_LIBGCC2 4. Improve 'function.c' hack.