Search code examples
linuxbcc-compiler

auto_start error in ld86 compiling


I'm trying to compile a fairly basic program under Linux and I'm having trouble with ld86. Anyone have an idea as to what auto_start is?

$ bcc  -c tc.c
$ as86 -o ts.o ts.s
$ ld86 -d ts.o tc.o /usr/lib/bcc/libc.a
ld86: warning: _gets redefined in file /usr/lib/bcc/libc.a(gets.o); using definition in tc.o
undefined symbol: auto_start

UPDATE 3/12/2012: Seems to go away when I define my own printf()...


Solution

  • Huzzah! I have found it.

    When calling main() in main.c I was using parameters like this

    int main(int i, char **c)
    

    However, if I use no parameters... it goes away

    int main()
    

    Must be because I do not pass anything into main from assembly. Also printf() has nothing to do with it, must have been playing with too many things at once.