<div dir="ltr">I will add a function isReservedSectionNumber() to check if it's one of UNDEFINED, ABSOLUTE or DEBUG sections.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 12:03 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">IMAGE_SYM_SECTION_MAX is defined as 0xFEFF which means that the valid range is from 1 to 65279.<div><div class="h5"><br>
<br><div>On Sun Mar 16 2014 at 6:51:25 PM, Nico Rieck <<a href="mailto:nico.rieck@gmail.com" target="_blank">nico.rieck@gmail.com</a>> wrote:</div>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">On 15.03.2014 01:04, Rui Ueyama wrote:<br>
> Author: ruiu<br>
> Date: Fri Mar 14 19:04:08 2014<br>
> New Revision: 203986<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=203986&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=203986&view=rev</a><br>
> Log:<br>
> Object/COFF: change data type of SymbolNumber from int16 to uint16.<br>
><br>
> Microsoft PE/COFF Spec clearly states that the field is of signed interger<br>
> type. However, in reality, it's unsigned. If cl.exe needs to create a large<br>
> number of sections for COMDAT sections, it will just create more than 32768<br>
> sections. Handling large section number as negative number is not correct.<br>
> I think this is a spec bug.<br>
><br>
> Differential Revision: <a href="http://llvm-reviews.chandlerc.com/D3088" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D3088</a><br>
><br>
> Modified:<br>
> llvm/trunk/include/llvm/<u></u>Object/COFF.h<br>
> llvm/trunk/include/llvm/<u></u>Support/COFF.h<br>
> llvm/trunk/test/MC/COFF/<u></u>feat00.s<br>
> llvm/trunk/test/MC/COFF/weak.s<br>
> llvm/trunk/tools/llvm-nm/llvm-<u></u>nm.cpp<br>
<br>
No test?<br>
<br>
This is also missing a few more spots where checks assume a signed<br>
section number (in COFFObjectFile::getSymbolType,<br>
COFFObjectFile::getSymbolSize and llvm-readobj COFFDumper::printSymbol).<br>
<br>
These checks shouldn't really be done this way and instead use a helper<br>
function to determine whether the section number is an index.<br>
<br>
-Nico<br></div></div><div class="">
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></blockquote>
</blockquote></div><br></div>