This was wrong before, because the type set was None. Instead it's supposed to be Object (checked both what ld.bfd and gold produce).
Diff Detail
Event Timeline
No, not really. I just wanted to be compliant with what gold produces. I can't find easily documentation on _DYNAMIC, so, I can't verify if it's a strict requirement. OTOH, I also don't see why we should diverge when doing what others do comes at no-cost. Your mileage may vary, of course =)
I also checked the gold/bfd output when implemented the _DYNAMIC and yes, it is STT_OBJECT for both.
Please refer to my comment about that (at the end):
http://reviews.llvm.org/D17607#362668
But seems that nobody remembers why it was done in that way:
https://sourceware.org/ml/binutils/2002-03/msg00360.html
So I decided not to do that without need. I think it does not affect anything.
On a second though, let's abandon this review.
I think maintaining this code is little effort but it's also little effort introducing this if really needed.
If Ian Taylor doesn't remember the need for it, that says a lot.
Looking on a talk date (2002-03), that was 14 years ago. So if he did not remember it that time, I think nowadays that's even more true :)
Sure. But that fact that even Ian were not sure why _DYNAMIC symbol has STT_OBJECT type.
It's worth noting as a comment. I'll add that.