Add MCSymbolCOFF

Pete Cooper peter_cooper at apple.com
Fri Jun 5 19:03:15 PDT 2015


Here’s the full set of patches I have so far.  The next step will be to change Flags to uint16_t to pack MCSymbol better.  I’ll get to that next week.

Cheers,
Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-MCSymbol-IsELF-to-an-enum-to-support-future-M.patch
Type: application/octet-stream
Size: 3486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-MCSymbolCOFF-class-and-use-it-to-get-and-set-the.patch
Type: application/octet-stream
Size: 5541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Move-COFF-Type-in-to-the-MCSymbolCOFF-class.patch
Type: application/octet-stream
Size: 1947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Move-all-of-the-MCSymbol-COFF-flags-logic-in-to-MCSy.patch
Type: application/octet-stream
Size: 5290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Add-MCSymbolMachO-which-will-be-used-to-hide-the-MCS.patch
Type: application/octet-stream
Size: 2262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Move-all-flags-logic-to-MCSymbolMachO.patch
Type: application/octet-stream
Size: 11406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Remove-unused-MCMachOSymbolFlags.h-header.patch
Type: application/octet-stream
Size: 2430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Make-flags-get-set-method-protected-so-that-all-flag.patch
Type: application/octet-stream
Size: 1666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/a9ad0f93/attachment-0007.obj>
-------------- next part --------------

> On Jun 5, 2015, at 4:39 PM, Pete Cooper <peter_cooper at apple.com> wrote:
> 
> Hey Rafael
> 
> This is ultimately part of an effort to reduce the size of MCSymbol even further.
> 
> One of the problematic fields is MCSymbol::Flags which needs to be a uint16_t on MachO and ELF but uint32_t on COFF.  
> 
> These patches create a MCSymbolCOFF class which for now is just used to hide the flags code for the type field of an encoded COFF symbol.  I’ll later move the type itself out of the uint32_t flags in MCSymbol and reduce that to a uint16_t.
> 
> I’m also going to create an MCSymbolMachO which will really just be used to contain all the flags logic.  I’d like to make setFlags, getFlags, and modifyFlags all be protected and actually handle the flags in the subclasses.  You already did all of this for ELF, but i’ll do MachO and COFF.
> 
> Cheers,
> Pete
> 
> <0001-Change-MCSymbol-IsELF-to-an-enum-to-support-future-M.patch><0002-Add-MCSymbolCOFF-class-and-use-it-to-get-and-set-the.patch>



More information about the llvm-commits mailing list