Could dmd/ldc/gdc produce user defined attributes embedded (eg as json string) embedded in some section of the object file/static/shared library, eg:

```
{"compiler" : "dmd", "version" : "2.072", "flags" : "-O -debug"}
```

with some way to write and read those attributes, so that tooling can give informative warnings or errors when attempting to link together several libraries whose attributes don't match (user defined function can decide what matches based on those attributes), or to select which libraries to link if there are several choices


NOTE: posted a more general question here [1] beyond just D usage

[1] http://stackoverflow.com/questions/41240093/how-to-annotate-a-compilation-output-object-library-file-with-compiler-annotat

quote from that question:
----

Use cases:

NOTE: the only thing I could find was https://gcc.gnu.org/onlinedocs/gccint/LTO-object-file-layout.html but not sure if that's relevant or how I would write (and later read) such user defined attributes:

Command line options (.gnu.lto_.opts): This section contains the command line options used to generate the object files