On 11/2/20 1:50 PM, Severin Teona wrote:
Hi guys!

I build the druntime for an ARM Cortex-M based microcontroller and I trying to create an application and link it with the druntime. I am also using TockOS[1], which does not implement POSIX thread calls and other OS-dependent implementations. As I was looking through the errors I got, I found some functions and I don’t know what they do, or how should I solve the errors.

The first one is:
libdruntime-ldc.a(dwarfeh.o): in function `_d_eh_personality_common': dwarfeh.d:(.text._d_eh_personality_common[_d_eh_personality_common]+0x2c): undefined reference to `_d_eh_GetIPInfo'

and the second one is:
dl.d:(.text._D4core8internal3elf2dl12SharedObject14thisExecutableFNbNiZSQCgQCeQByQBxQBx[_D4core8internal3elf2dl12SharedObject14thisExecutableFNbNiZSQCgQCeQByQBxQBx]+0x1a): undefined reference to `dl_iterate_phdr' (the druntime was build as a static library, because I can’t use dynamic libraries on a microcontroller)

Does anyone know what these exactly do and how important/essential are they? Is there any way I could solve them?

Thank a lot.

[1]: https://www.tockos.org


cant' help much but just in case - see https://github.com/ldc-developers/ldc/pull/2405#issuecomment-346187456, may be it helps

also you can define this symbol yourself with assert(0) to check if it is called at all

what about - quick glance at https://linux.die.net/man/3/dl_iterate_phdr says us that this symbol is used only with shared objects so you can try to define it yourself with assert(0) like this (not tested!!!):
```D
extern(C):
alias Callback = int function (void*, size_t, void*);
int dl_iterate_phdr(Callback callback, void* data)
{
        assert(0);
}
```
this lets you to link druntime at least and if those symbols were called abort the execution

Reply via email to