Symbols missing, unmangle!

Johnson via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 30 15:04:21 PDT 2017


On Wednesday, 30 August 2017 at 21:51:51 UTC, Moritz Maxeiner 
wrote:
> On Wednesday, 30 August 2017 at 20:23:18 UTC, Johnson Jones 
> wrote:
>> It would be nice if, when symbols are missing, they are 
>> unmangled!
>>
>> Error 42: Symbol Undefined 
>> _D12mMunchhousin12iMunchhousin11__T4GoTsZ4GoMFS12mMunchhousin18__T10MunchhousinTsZ10sMunchhousinfE12mMunchhousin9eGoffZv (void Munchhousin.Munchhousin.Go!(short).Go()
>
> Since that's a linker error and there are a multitude of 
> linkers that a person could want to use after a D compiler this 
> is a non-trivial issue in general.
> Options to tackle this include:
> 1) Have a D compiler capture the linker output and demangle it
> 2) Try to get demangling of D symbols into upstream of the 
> currently common linkers (GNU linker, gold, lld, etc.)
> 3) Integrate a (FLOSS) cross platform linker into dmd's backend 
> at the source code level, with support for such demangling (and 
> drop OPTLINK)
> 4) Fork a (FLOSS) cross platform linker for use with D, add 
> such support, and distribute a binary of it with dmd's binary 
> distribution (and drop OPTLINK)
>
> I'm not proposing any of these are what should be done, I've 
> listed them more as an example that something like this would 
> require extensive discussion.
>
> [1] https://github.com/ldc-developers/ldc/releases/tag/v1.3.0


A simple wrapper around optilink could possible do this? Not 
well, but it might be enough?

Obviously optilink is the source of the problem.

How hard is it to take a string like the above and demangle it in 
to a readable format? If there is such a funciton in the D 
compiler, a simple wrapper could be used to parse the output, 
capture symbol errors, and demangle them.

My feeling is that optilink needs to be put to rest. Things die, 
let them... move on to greener pastures.



More information about the Digitalmars-d mailing list