Haavard Skinnemoen wrote: > "Bart Van Assche" <bart.vanassche@xxxxxxxxx> wrote: > > I looked through the gold sources a bit. I wish everything in the GNU > > toolchain were written this way. It is very clean code, nicely > > commented, and easy to follow. It shows pretty clearly, I think, the > > ways in which C++ can be better than C when it is used well. > > I guess he never looked at the target interface... > > [snip virtual method with loads of arguments which looks like binutils] > > I can't wait to implement avr32 support for that monster...I thoroughly > hate working on libbfd, and it looks like gold has made many of the > same stupid decisions on the interface level. > Just shows that using C++ doesn't fix a design that is broken to begin > with. The GNU Binutils requirement was to target lots of different object formats, and architectures, allow different ones to be interconverted and linked together, and to run on lots of platforms. Given those constraints, probably C was the only option at the time, and BFD's interface, although ugly and difficult to work with, does reflect the abstractions of different object formats and architectures moderately well IMHO. It's tough to make a nice design that meets those requirements. It's unfortunate that BFD is so hard to work with that people resort to post-processing tools and other hacks, instead of enjoying adding new format support to it. For all it's faults working with it, the tools themselves are very versatile and useful compared with most equivalents. If you have clear improvements that would simplify GOLD (without breaking it or requirements you might not be aware of), the author may be quite receptive to them. He seems keen on the code being of high quality, and he's quite experienced at working on "open" projects with many contributors. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html