[all-commits] [llvm/llvm-project] 952685: [ELF, test] Add static-pie test related to demoted ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Jan 27 22:20:11 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 952685a43d0436577df95ea318b2460438f67982
      https://github.com/llvm/llvm-project/commit/952685a43d0436577df95ea318b2460438f67982
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-01-27 (Mon, 27 Jan 2025)

  Changed paths:
    M lld/test/ELF/weak-undef-lib.s

  Log Message:
  -----------
  [ELF,test] Add static-pie test related to demoted lazy symbol

The reverted
1a4d6de1b532149b10522eae5dabce39e5f7c687
("[ELF] Remove redundant isExported computation")
had incorrect
```
+        if (sym->includeInDynsym(ctx))
+          sym->isExported = true;
```

causing undefined weak symbols (defined in archives, demoted; e.g.
__cxa_finalize) to be exported for static-pie.

Add a regression test for this corner case. The issue actually exposed
another issue related to includeInDynsym, which has been fixed by
f10441ad003236ef3b9e5415a571d2be0c0ce5ce.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list