Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DJGPP + HDPMI problem: unresolved symbols (Developers)

posted by shwonder, Haifa, Israel, 23.01.2008, 17:10
(edited by shwonder on 23.01.2008, 18:28)

Hi

I'm trying to compile SAMPLES\djgpp\hello.c, expecting to get stand alone executable, containing HDPMI. But I have unresolved symbols. I do the following steps:

1. gcc -c Hello.c -oHello.o
2. ld -r -x -s -T ../../lib/djgpp.ld -oHello.bin -Map hello_.map ../../lib/crt0hx.o Hello.o -lm -lc
3. ..\..\BIN\ldfix Hello.bin
4. \mingw\bin\ld -e start -o Hello.exe -Map Hello.map -pie Hello.bin
5. ..\..\BIN\pestub -q -n -w -x Hello.exe ..\..\BIN\dpmist32.bin

at step 4 I get the following errors:

Hello.bin:(.text+0x10): undefined reference to `__djgpp_ds_alias'
Hello.bin:(.text+0x2b): undefined reference to `_crt0_startup_flags'
Hello.bin:(.text+0xe2b1): undefined reference to `__djgpp_stack_top'

I found, that in original crt0.o, supplied with DJGPP, these symbols exist, but in crt0hx.o they don't. The comment in crt0hx.S says, that __djgpp_ds_alias, for example should be defined at go32\exception.S, but it isn't there.

I tried to work around the problem, by declaring the these symbols in hello.c:

---[ cut ]---
unsigned short __djgpp_ds_alias;
unsigned long __djgpp_stack_top;
int _crt0_startup_flags;
---[ cut ]---

In this case I'm able to get an executable, but when I try to run, it crashes with SIGSEGV at 004017e5.

I'm using djgpp suite ver. 2.0.4,
gcc 4.22,
g++ 4.22
Latest HXRT (2.13)

Thanks!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 156 users online (0 registered, 156 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum