Issue 110095
Summary [LLD] [X86_64] Adjust symbol value/size after optimize basic block jump
Labels
Assignees
Reporter ywgrit
    After basic block jump optimization on X86_64, symbol size may need to be adjusted.
Is the `def->value <= OldSize`  should be `def->value <= NewSize`?

```CPP
static void fixSymbolsAfterShrinking() { 
   // ... 
   if (def->value + def->size > NewSize && def->value <= OldSize &&
          def->value + def->size <= OldSize) {
 LLVM_DEBUG(llvm::dbgs()
                   << "Shrinking symbol " << Sym->getName() << " from "
                   << def->size << " to " << def->size - inputSec->bytesDropped
                   << " bytes\n");
        def->size -= inputSec->bytesDropped;
      }
 //...
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to