Global constructors

Tiago Stein D'Agostini tiago@lisha.ufsc.br
Wed Oct 29 08:46:00 GMT 2003


I am srry if that is not an 100% gcc problem, but I couldn`t find anyone 
else that would give me a clue.

I work in a research group(academic) where we develop an operating system. 
For some reasons that goes beyond my control, our entry point have been 
redefined. We use :

 .file "ia32_start.s"
.text
  .align 4
.globl _start
  .type  _start,@function
_start:
  call  main
  pushl %eax
  call  _exit
.Lfe1:
  .size  _start,.Lfe1-_start

as our START and entry point. Everything else is ELF exactly as gcc 
outputs it..

But I need to make it to call the global constructors (a call to it just 
before call to main). Unfortunatelly I am not able to put a call to __do_global_ctors_aux (LD indicates an undefined 
reference) even the __do_global_ctors_aux being there at the object file.

I've already spent much time trying to figure it out why. So I would be 
glad if someone can give me a clue.


Thank you in advance.
-- 
If brute force doesn`t solve your problem..... you aren`t using enough!



More information about the Gcc mailing list