<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>Making the code for exidx sentinel crash-proof is only half of the deal in my case.<br>
</p>
<p>I still need the symbol in the assignment at the end of the section description to point after synthetic data, such as this sentinel or the space reservation for copy relocations. This is that both bfd and gold do, and our environment depends on that behavior.
 But, at the same time, as Peter noted, placement of orphan sections should not be affected.<br>
</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>