<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 07/24/2013 04:42 PM, Martin Nowak
wrote:<br>
</div>
<blockquote cite="mid:51EFE7D8.303@dawg.eu" type="cite">The basic
problem to solve is that _minfo* sections must be merged by the
linker but _minfo_beg and _minfo_end must not be be external
symbols as the executable would superimpose them.
<br>
This is currently done with section groups of internal symbols.
<br>
I recently had the idea that it should also work with hidden
external symbols but I still have to verify that.
<br>
If it works we could move the functionality into the glue layer so
that it can hopefully be reused by GDC and LDC.
<br>
Otherwise we could also try to add support for section groups and
internal symbols in the glue layer but that might be a lot of
work.
<br>
<br>
Best,
<br>
Martin
<br>
<br>
</blockquote>
I tried that out and it works.<br>
The linker will correctly merge the external weak symbols, but
because they are hidden they remain inaccessible<br>
from outside of a shared library. Thus the runtime linker won't
interpose <span style="color: rgb(0, 0, 0); font-family: 'Times New
Roman'; font-size: medium; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none;"></span>the bracketing symbols with the
ones from<br>
the executable or another shared library.<br>
This should be fairly simple to implement in the glue layer, we only
need to mark the COMDAT variables as hidden.<br>
</body>
</html>