<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: 2px solid rgb(128, 0, 0); }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Maybe I can't fully understand​ your idea, but to put the relocation we still need to find the reference section, so I can't see why this approach is simpler than the current code. And we still have to write <span style="font-size: 12pt;">EXIDX_CANTUNWIND</span><span style="font-size: 12pt;">​,
 so we can't get rid of  'ARMExidxSentinelSection::writeTo()' altogether. Am I right?<br>
</span></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<span style="font-size:10.5pt; font-family:Calibri,sans-serif">Best Regards,</span></div>
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font size="2"><span lang="en-US" style="font-size:10.5pt">Igor Kudrin</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font size="2"><span lang="en-US" style="font-size:10.5pt">C++ Developer,</span></font></span></font><span style="font-family:Calibri,sans-serif; font-size:14.6667px"> </span><span style="font-family:Calibri,sans-serif; font-size:14.6667px">Access
 Softek, Inc.</span></div>
</div>
</div>
<div style="color:rgb(33,33,33)">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Rafael Avila de Espindola <rafael.espindola@gmail.com><br>
<b>Sent:</b> Wednesday, December 13, 2017 4:56 AM<br>
<b>To:</b> reviews+D41105+public+9917650116a4fc81@reviews.llvm.org; Igor Kudrin; peter.smith@linaro.org; ruiu@google.com<br>
<b>Cc:</b> aemerson@apple.com; emaste@freebsd.org; javed.absar@arm.com; llvm-commits@lists.llvm.org; kristof.beyls@arm.com; adhemerval.zanella@linaro.org; t.p.northover@gmail.com; kanheim@a-bix.com; james.molloy@arm.com; diana.picus@linaro.org; florian.hahn@arm.com<br>
<b>Subject:</b> Re: [PATCH] D41105: [ELF] Fix placement of a sentinel entry in the .ARM.exidx section.</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">Igor Kudrin via Phabricator <reviews@reviews.llvm.org> writes:<br>
<br>
> +    // Find the last existing InputSectionDescription.<br>
> +    // Add a new only if we cannot find one.<br>
> +    // As a result, if we have a description for an output section like<br>
> +    // .foo : { *(.foo) bar = . }<br>
> +    // we will place the new section before the assignment so that it will<br>
> +    // affect the value of 'bar', which is, probably, expected.<br>
> +    // We also had a crash in the similar situation with an .ARM.exidx sentinel,<br>
> +    // because 'ARMExidxSentinelSection::writeTo()' expected it to be placed<br>
> +    // into a non-empty bucket.<br>
<br>
I would actually find the result surprising in the general case.<br>
<br>
I think we can just make the exidx code more resilient. Instead of<br>
having a special handling in writeTo, could we push a relocation to the<br>
Relocations vector of the sentinel entry?<br>
<br>
Cheers,<br>
Rafael<br>
</div>
</span></font></div>
</body>
</html>