On 2011-09-07 09:35:26 +0000, Walter Bright <newshou...@digitalmars.com> said:

On 9/7/2011 12:35 AM, Jacob Carlborg wrote:
On 2011-09-06 20:00, Walter Bright wrote:
On 9/6/2011 5:02 AM, Michel Fortin wrote:
What Apple does is meant to keep binary
compatibility.

It doesn't work that well. dmd breaks with every new OS update.

The winner with binary compatibility is, far and away, Microsoft.

Maybe it would work better if you would use the proper API instead of putting
__name_beg and __name_end around sections in the binary, i.e. __minfo_beg and
__minfo_end.

Actually, I did follow documented behavior of ld. Unfortunately, ld does not follow the documented behavior.

Indeed. Although nowhere in the documentation does it says what the linker does with empty sections, it is reasonable to assume they'd be treated like other sections (kept in the right order). But this has been proven unreliable and it turns out there are proper APIs to do what this hack was meant to do, so we should use them instead.

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to