digitalmars.D.learn - Why do we still need/use .di 'header' files?
- Lionello Lunesu (6/6) Nov 17 2006 Wouldn't it be possible to make a tool that dumps the symbols from
- Don Clugston (3/12) Nov 17 2006 Protection attributes and many other things are not in the decorated nam...
- Jarrett Billingsley (4/7) Nov 17 2006 This is why there needs to be a "D object file" format.. :P That would ...
- John Reimer (4/13) Nov 17 2006 Totally agree with this! It would also shed a whole lot of other proble...
- Chris Nicholson-Sauls (5/17) Nov 17 2006 It might kill C compatability in some cases... /but/ having such a thing...
- BCS (5/6) Nov 17 2006 if you are taking about closed source libs, that isn't an issue. It
- Daniel Keep (21/30) Nov 17 2006 If the object file was compiled by D, it shouldn't be too hard. As Don
- Don Clugston (5/13) Nov 19 2006 No, I wasn't. Just pointing out that source->obj is a lossy process,
- Lionello Lunesu (10/13) Nov 17 2006 If you depend heavily on templates/conditional compilation, you'd be for...
Wouldn't it be possible to make a tool that dumps the symbols from objs/libs, undoing any name-decoration? And wouldn't it be possible to built that tool right into the compiler? I don't know if protection attributes are being encoded in a decorated name, but that issue wouldn't be hard to overcome. L.
Nov 17 2006
Lionello Lunesu wrote:Wouldn't it be possible to make a tool that dumps the symbols from objs/libs, undoing any name-decoration? And wouldn't it be possible to built that tool right into the compiler? I don't know if protection attributes are being encoded in a decorated name, but that issue wouldn't be hard to overcome. L.Protection attributes and many other things are not in the decorated names. What about templates, and conditional compilation?
Nov 17 2006
"Don Clugston" <dac nospam.com.au> wrote in message news:ejkbnm$1qb1$1 digitaldaemon.com...Protection attributes and many other things are not in the decorated names. What about templates, and conditional compilation?This is why there needs to be a "D object file" format.. :P That would be a killer feature IMO.
Nov 17 2006
On Fri, 17 Nov 2006 07:17:41 -0800, Jarrett Billingsley <kb3ctd2 yahoo.com> wrote:"Don Clugston" <dac nospam.com.au> wrote in message news:ejkbnm$1qb1$1 digitaldaemon.com...Totally agree with this! It would also shed a whole lot of other problems for D.Protection attributes and many other things are not in the decorated names. What about templates, and conditional compilation?This is why there needs to be a "D object file" format.. :P That would be a killer feature IMO.
Nov 17 2006
Jarrett Billingsley wrote:"Don Clugston" <dac nospam.com.au> wrote in message news:ejkbnm$1qb1$1 digitaldaemon.com...It might kill C compatability in some cases... /but/ having such a thing, with perhaps a compiler switch to emit "legacy" object files, would be nice -- and would make DDL far, far simpler to implement I'm sure. -- Chris Nicholson-SaulsProtection attributes and many other things are not in the decorated names. What about templates, and conditional compilation?This is why there needs to be a "D object file" format.. :P That would be a killer feature IMO.
Nov 17 2006
Don Clugston wrote:What about templates, and conditional compilation?if you are taking about closed source libs, that isn't an issue. It would be nice to have a tool that would walk a .o/.a/.lib file (that doesn't come with source) and generate a .di file that lets you link to it. Just dreaming I guess.
Nov 17 2006
BCS wrote:Don Clugston wrote:If the object file was compiled by D, it shouldn't be too hard. As Don said, you won't get templates, conditional compilation switches, protection attributes, etc., but it should work in general. But if that bugger's got C linkage, forget it. C linkage tells you the name and nothing more. And since in C the callee cleans up the stack, you can't even reliably disassemble the ASM to work out what kinds of arguments it takes (at least, not to my knowledge.) <2¢> Maybe what would work is if we defined a wrapper format, like DDL files, that takes the generated object file (of whatever format the native machine supports), and wraps it with additional information. That, or we could just get DDL built into the standard D toolchain. (Also just dreaming :P) </2¢> -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/What about templates, and conditional compilation?if you are taking about closed source libs, that isn't an issue. It would be nice to have a tool that would walk a .o/.a/.lib file (that doesn't come with source) and generate a .di file that lets you link to it. Just dreaming I guess.
Nov 17 2006
BCS wrote:Don Clugston wrote:No, I wasn't. Just pointing out that source->obj is a lossy process, it's not fully reversible (unless you include most of the source in the obj file, which I think defeats most of the purpose). ItWhat about templates, and conditional compilation?if you are taking about closed source libs, that isn't an issue.would be nice to have a tool that would walk a .o/.a/.lib file (that doesn't come with source) and generate a .di file that lets you link to it. Just dreaming I guess.
Nov 19 2006
"Don Clugston" <dac nospam.com.au> wrote in message news:ejkbnm$1qb1$1 digitaldaemon.com...Protection attributes and many other things are not in the decorated names. What about templates, and conditional compilation?If you depend heavily on templates/conditional compilation, you'd be forced to release the source, and that makes sense. But what if I have a old-school lib with no need for templates? OT: I'm really afraid that D's dropping old-school, and going all fancy with meta-programming'n'shit. Frankly, I don't want to write meta-code that will then generate code for the compiler to compile... Templates are nice, but everything should also be possible without them... L.
Nov 17 2006