Mail Archives: djgpp/1999/05/06/03:08:11
On Wed, 5 May 1999, Jari Tuominen wrote:
> kernel32.o(.text+0x168):kernel32.c: more undefined references to =
> `_GLOBAL_OFFSET_TABLE_' follow
> kernel32.o(.text+0x301):kernel32.c: undefined reference to `___main'
>
> C:\jtm\bin\JTMOS\KERNEL32>type c:\jtm\bin\bat\mk.bat
> @echo off
> gcc -fpic -w -c %1.c -Wall -O
> rem -fstrength-reduce -fomit-frame-pointer -nostdinc
> ld %1.o -o %1.bin -oformat binary -Ttext 0x10000 -Tdata 0x20000 -Tbss =
> 0x20000
>
> .......................
> What is this _GLOBAL_OFFSET_TABLE_?
It is there because you used -fpic. Read the docs of -fpic in the GCC
manual (the node in gcc.info is called "Code Gen Options").
Are you sure you need -fpic?
And please don't post in HTML, it makes it very difficult to read.
- Raw text -