<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; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="color: rgb(33, 33, 33); font-size: 12pt;">>>OK, so my understanding is this.</span><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div style="color:rgb(33,33,33)">>></div>
<div style="color:rgb(33,33,33)">>>Assume you have four mergeable string input sections .foo.1, .foo.2, .bar.1 and .bar.2, where .foo.{1,2} are writable but .bar.{1,2} are not. Also assume you have this >>linker script.</div>
<div style="color:rgb(33,33,33)">>> </div>
<div style="color:rgb(33,33,33)">>>  .rodata : { *(.foo.*) *(.bar.*); }<br>
</div>
<div style="color:rgb(33,33,33)">>> </div>
<div style="color:rgb(33,33,33)">>>LLD currently creates two .rodata sections for those inputs. One for .foo.{1,2} and the other for .bar.{1,2}. This is because mergeable sections are merged based on >>section attributes.</div>
<div style="color:rgb(33,33,33)">>> </div>
<div style="color:rgb(33,33,33)">>>Is this correct? What do you think is a correct behavior?<br>
</div>
<div style="color:rgb(33,33,33)">> </div>
<div style="color:rgb(33,33,33)">>If you look at my testcase D29217, you'll see it is not issue I am trying to solve. </div>
<div style="color:rgb(33,33,33)"><span style="color:rgb(33,33,33); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">>Also, looking at the </span><span style="color:rgb(33,33,33); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">writable-merge.s</span><span style="color:rgb(33,33,33); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">​
 testcase, I think your example is unreal, we do not support writable merge sections.</span>​<br>
</div>
<div style="color:rgb(33,33,33)">> </div>
<div style="color:rgb(33,33,33)">>I am trying to solve situation when mergeable and non-mergeable sections are mixed inside single command, what results in a two different output section and >breaks symbol assigning logic.<br>
</div>
<div style="color:rgb(33,33,33)">>Clean solution here is to create synthetic mergeable sections, right ? So I think correct behavior for my testcase it to create single output section.<br>
</div>
<div style="color:rgb(33,33,33)">> </div>
<div style="color:rgb(33,33,33)">>George.<br>
</div>
<div style="color:rgb(33,33,33)"><br>
</div>
<div style="color:rgb(33,33,33)">But generally, D27415 now creates synthetic input sections basing on name, flags and alignment of input mergeable sections.<br>
</div>
<div style="color:rgb(33,33,33)">Then created synthetic mergeable sections with different attributes are merged into single output.<br>
</div>
<div style="color:rgb(33,33,33)">That I think is behavior we want when talking about creating synthetic mergeable sections, right ?<br>
</div>
<div style="color:rgb(33,33,33)"><br>
</div>
<div style="color:rgb(33,33,33)">George.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>