<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 7, 2010, at 3:25 PM, Sylvere Teissier wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Anton Korobeynikov wrote:<br><blockquote type="cite">Hello, Sylvere<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite"><blockquote type="cite">Currently it works only for elf format backend, for other object formats<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">these options are ignored.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">   <br></blockquote></blockquote><blockquote type="cite">First of all, please honor the LLVM coding style (or, at least, the<br></blockquote><blockquote type="cite">code style of the source files you're modifying).<br></blockquote><blockquote type="cite"> <br></blockquote>Ok, I have checked this point, I hope it's ok now<br><blockquote type="cite">Second, I belive the approach used is wrong - there is already way to<br></blockquote><blockquote type="cite">emit objects into separate sections, which<br></blockquote><blockquote type="cite">is used for linkonce objects, you just need to hook in there. No need<br></blockquote><blockquote type="cite">to reinvent the wheel :)<br></blockquote><blockquote type="cite"> <br></blockquote>Thanks for the tip, I've changed my patch using the existing code. But I use different section names than gnu.linkonce when It's not "WeakForLinker"<br>because gnu.linkonce.* are special sections. (I try to follow GCC section naming for -ffunction-sections/-fdata-sections)<br></span></blockquote></div><br><div>Hi Sylvere,</div><div><br></div><div>I agree that they can't be happen with linkonce linkage... but this should be handled in the backend, not in the frontend.  <span class="Apple-style-span" style="font-family: Inconsolata; font-size: 12px; ">TargetLoweringObjectFileELF::SelectSectionForGlobal is in charge of picking the section to use of a global, can you put this logic there?</span></div><div><font class="Apple-style-span" face="Inconsolata"><br></font></div><div><font class="Apple-style-span" face="Inconsolata">-Chris</font></div></body></html>