[PATCH] D72027: [XCOFF][AIX] Support basic relocation type on AIX
    Jason Liu via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jan  3 18:21:37 PST 2020
    
    
  
jasonliu marked an inline comment as done.
jasonliu added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:350
     // Handle undefined symbol.
     if (ContainingCsect->getCSectType() == XCOFF::XTY_ER) {
       UndefinedCsects.emplace_back(ContainingCsect);
----------------
DiggerLin wrote:
> 1. Can We delete code line 350 ~ 354 ?
> 
> 2. and change  line 333 to
> if   ( XCOFF::XTY_ER != MCSec->getCSectType() && nameShouldBeInStringTable(MCSec->getSectionName()))
> 
> 3. delete line 328 ,329 
>     assert(XCOFF::XTY_ER != MCSec->getCSectType() &&
>            "An undefined csect should not get registered.");
> 
> 
> 4. changed the line 336
> CsectGroup &Group = getCsectGroup(MCSec);
> 
> to 
> CsectGroup &Group = (XCOFF::XTY_ER != MCSec->getCSectType() ? getCsectGroup(MCSec):  UndefinedCsects);
I don't think we could do this under current design. As the 328 and 329 assert suggested, we do not register undefined csect, we only register its symbol. 
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72027/new/
https://reviews.llvm.org/D72027
    
    
More information about the llvm-commits
mailing list