From: NoEmailAds AT execpc DOT com (Christopher Giese) Newsgroups: comp.os.msdos.djgpp Subject: -fPIC with DJGPP Date: Sun, 01 Nov 1998 03:22:23 GMT Organization: Cheeseland Clench Lines: 25 Message-ID: <71gk5n$el4@newsops.execpc.com> NNTP-Posting-Host: venus-66.mdm.hfd.execpc.com X-Trace: daily-planet.newsops.execpc.com 909890551 15012 (None) 169.207.101.66 X-Complaints-To: abuse AT execpc DOT com X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am using DJGPP to experiment with position-independent code. This is for a toy operating system that I'm writing. The position-independent code runs before address translation (paging) is set up and running. After compiling with the -fPIC option, the link fails: ld -o start.cof -Tlink.scr starta.o startc.o startc.o: In function `main': startc.c:32: undefined reference to `GLOBAL_OFFSET_TABLE_' make.exe: *** [start.cof] Error 1 I did some tinkering with the ELF file format a while ago. Is GLOBAL_OFFSET_TABLE strictly an ELF thingy? Can I make -fPIC work with COFF format? What is the format of GLOBAL_OFFSET_TABLE for COFF? Regards, Chris Giese -- geezer@ | Sales rushes in where netwurx.net | Engineering fears to tread