[lld] [ELF] Merge exportDynamic into versionId (PR #71272)

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 00:06:44 PDT 2023


================
@@ -3128,7 +3128,8 @@ void VersionTableSection::writeTo(uint8_t *buf) {
     // For an unextracted lazy symbol (undefined weak), it must have been
     // converted to Undefined and have VER_NDX_GLOBAL version here.
     assert(!s.sym->isLazy());
-    write16(buf, s.sym->versionId);
+    write16(buf, s.sym->versionId == uint16_t(-1) ? VER_NDX_GLOBAL
----------------
igorkudrin wrote:

Did you mean
```suggestion
    write16(buf, s.sym->versionId == nonExported ? VER_NDX_GLOBAL
```

https://github.com/llvm/llvm-project/pull/71272


More information about the llvm-commits mailing list