delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/06/03:08:11

Date: Thu, 6 May 1999 10:06:02 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jari Tuominen <jer64 AT kolumbus DOT fi>
cc: djgpp AT delorie DOT com
Subject: Re: Mysterious _GLOBAL_OFFSET_TABLE_
In-Reply-To: <001301be970f$644b1b60$9cf2e5c1@jairn-tietokone>
Message-ID: <Pine.SUN.3.91.990506100506.2814B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019