digitalmars.D - [Binutils support] Add demangling to libiberty
- Iain Buclaw (14/14) Jan 10 2014 One of the binutils devs suggested this, to move D demangling
- H. S. Teoh (7/10) Jan 10 2014 [...]
- Iain Buclaw (36/43) Jan 11 2014 This is a start. Unfortunately through testing, it becomes more
- Iain Buclaw (3/10) Jan 18 2014 Initial patches have been committed !
- Andrei Alexandrescu (3/16) Jan 19 2014 This is terrific. Congratulations!
One of the binutils devs suggested this, to move D demangling into libiberty, that way binutils programs (and any other program that uses libiberty in a similar manner) will gain D support. For binutils, this would include D demangling support for (via the -C or --demangle= switch). - nm - addr2line - objdump - ld https://github.com/ibuclaw/gdb/commit/0ba7ac2f91f45b24bcfba2d1ecedb10580fac152 I have named the specified demangle style as 'dlang', if no one has objects, I'll go ahead and write it up. Regards Iain.
Jan 10 2014
On Fri, Jan 10, 2014 at 05:51:17PM +0000, Iain Buclaw wrote:One of the binutils devs suggested this, to move D demangling into libiberty, that way binutils programs (and any other program that uses libiberty in a similar manner) will gain D support.[...] Yes! Please do!! This will go a long way in helping D get stronger tool support, at least on GNU platforms. T -- Freedom: (n.) Man's self-given right to be enslaved by his own depravity.
Jan 10 2014
On 10 January 2014 20:05, H. S. Teoh <hsteoh quickfur.ath.cx> wrote:On Fri, Jan 10, 2014 at 05:51:17PM +0000, Iain Buclaw wrote:This is a start. Unfortunately through testing, it becomes more apparently that the ability to demangle templates is absolute key here to the success of this. Without demangling: $ ./ld/ld-new test.o 2>&1 | grep -v "__T" ./ld/ld-new: warning: cannot find entry symbol _start; defaulting to 0000000000400120 test.o: In function `main': /opt/usr/include/d/4.9.0/__entrypoint.di:59: undefined reference to `_d_run_main' test.o: In function `_Dmain': /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `_D3std4math3tanFNaNbNeeZe' test.o: In function `test._D4test9__modinitFZv': /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `_Dmodule_ref' /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `_Dmodule_ref' test.o:(.data+0x10): undefined reference to `_D3std4math12__ModuleInfoZ' With demangling: $ ./ld/ld-new test.o --demangle=dlang 2>&1 | grep -v "__T" ./ld/ld-new: warning: cannot find entry symbol _start; defaulting to 0000000000400120 test.o: In function `main': /opt/usr/include/d/4.9.0/__entrypoint.di:59: undefined reference to `_d_run_main' test.o: In function `D main': /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `std.math.tan(real)' test.o: In function `test._D4test9__modinitFZv': /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `_Dmodule_ref' /home/iain/src/gdc/gdb/objdir/test.d:5: undefined reference to `_Dmodule_ref' test.o:(.data+0x10): undefined reference to `std.math.moduleinfo$' Anyway, here's the guts of the change. https://github.com/ibuclaw/gdb/commit/45c505dbc0eecb9fa7842dcbdf46894e450c9cbc Regards Iain.One of the binutils devs suggested this, to move D demangling into libiberty, that way binutils programs (and any other program that uses libiberty in a similar manner) will gain D support.[...] Yes! Please do!! This will go a long way in helping D get stronger tool support, at least on GNU platforms.
Jan 11 2014
On 10 January 2014 20:05, H. S. Teoh <hsteoh quickfur.ath.cx> wrote:On Fri, Jan 10, 2014 at 05:51:17PM +0000, Iain Buclaw wrote:Initial patches have been committed ! https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=log;h=50367cd2ada722ddf5bede594d8ed7631fcde5abOne of the binutils devs suggested this, to move D demangling into libiberty, that way binutils programs (and any other program that uses libiberty in a similar manner) will gain D support.[...] Yes! Please do!! This will go a long way in helping D get stronger tool support, at least on GNU platforms.
Jan 18 2014
On 1/18/14 10:34 AM, Iain Buclaw wrote:On 10 January 2014 20:05, H. S. Teoh <hsteoh quickfur.ath.cx> wrote:This is terrific. Congratulations! AndreiOn Fri, Jan 10, 2014 at 05:51:17PM +0000, Iain Buclaw wrote:Initial patches have been committed ! https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=log;h=50367cd2ada722ddf5bede594d8ed7631fcde5abOne of the binutils devs suggested this, to move D demangling into libiberty, that way binutils programs (and any other program that uses libiberty in a similar manner) will gain D support.[...] Yes! Please do!! This will go a long way in helping D get stronger tool support, at least on GNU platforms.
Jan 19 2014