This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

undefined reference __start_set_sysinit_set


Hello!

I am trying to link the compiled source of FreeBSD 7 with gcc, which
always fails to find the symbols '__start_set_sysinit_set' and
'__stop_set_sysinit_set'.

The compiler is gcc version 4.1.2, for amd64 target.

There is very little on the web about these symbols.
What I managed to find out, that these are put together by C macros
and in the end, are defined as extern structures. There are no
implementations behind them.

But for i386, using gcc version 3.2.3 I have managed to compile and
link the source, without any problems.


I have compared the object files and it seems, that a whole lot
symbols are missing from the symtab. Especially objects starting with
"__set_sysinit_set_sym_" .

You can have look at the source file here:
http://fxr.watson.org/fxr/source//kern/init_main.c?v=FREEBSD7

The generated object's symtab were made with 'objdump -t' . (Attached
outputs i386: objd_i386, amd64: objd_amd64).
Some of the missing symbols are:

0000018c l     O .data    00000010 placeholder_sys_init
00000000 l    d  set_sysinit_set    00000000 set_sysinit_set
00000000 l     O set_sysinit_set    00000004
__set_sysinit_set_sym_placeholder_sys_init

These should be generated according to code.
The symbols in the error message are listed undefined for both architectures:
   i386:
00000000         *UND*    00000000 __start_set_sysinit_set
00000000         *UND*    00000000 __stop_set_sysinit_set

   amd64
0000000000000000         *UND*    0000000000000000 __start_set_sysinit_set
0000000000000000         *UND*    0000000000000000 __stop_set_sysinit_set

I also noticed a line  which appears only with amd64:

0000000000000000 l    d  .note.GNU-stack    0000000000000000 .note.GNU-stack



Can please someone tell me what I might do wrong? Why are symbols missing?
Thanks in advance.

Attachment: objd_i386
Description: Binary data

Attachment: objd_amd64
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]