<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<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;">>​></span><span style="color: rgb(33, 33, 33); font-size: 12pt;">>template <class ELFT> void InputSectionBase<ELFT>::uncompress() {</span><br>
</p>
<div style="color: rgb(33, 33, 33);">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">>>>-  typedef typename std::conditional<ELFT::Is64Bits, Elf64_Chdr,</span></div>
<div class="gmail_quote"><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">>>>-                                    Elf32_Chdr>::type
</span><span style="font-size: 12pt;">Elf_Chdr</span><span style="font-size: 12pt;">;</span></div>
<div class="gmail_quote"><span style="font-size: 12pt;"></span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
</blockquote>
<span style="font-size: 12pt;">​>></span><span style="font-size: 12pt;">So looks it could be just that. Remove of this typedef is enough generally to fix the issue.</span></div>
<div class="gmail_quote"><span style="font-size: 12pt;"></span><span style="font-size: 12pt;">>>New code looks better though.</span>
<div>> </div>
<div>>I'm not sure if I understand what you meant, but you have to read Elf_Chdr::ch_size in target's byte order. <br>
</div>
<div><br>
</div>
<div>Yep. </div>
<div>And I mean that removing of that typename was enough. <br>
</div>
<div>With it Elf_Chdr was <span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Elf64_Chdr</span> or <span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Elf32_Chdr
 which are simple structs with PODs,</span><br>
</div>
<div><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">but without ELFT::Chdr is used, which is Elf_Chdr_Impl<ELFType<E, Is64>>​ and that</span></div>
<div><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">was enough to fix that issue I think.</span></div>
<div><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></div>
<div><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">George.</span></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>