Druntime undefined references

IGotD- nise at nise.com
Mon Nov 2 11:18:38 UTC 2020


On Monday, 2 November 2020 at 10:50:06 UTC, 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

https://man7.org/linux/man-pages/man3/dl_iterate_phdr.3.html

dl_iterate_phdr is used to iterate over the elf program headers 
and is used to get a textual back trace among other things. These 
are typically calls found in Linux systems and if you don't have 
that, you have to replace them with your own calls or just remove 
the call all together.

Much of the elf stuff can be removed. The only things that might 
be essential is that druntime needs to know where the TLS data is 
per thread for scanning.



More information about the Digitalmars-d-learn mailing list