[all-commits] [llvm/llvm-project] 070d7a: [ELF] --export-dynamic: don't create dynamic secti...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Mar 27 20:05:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 070d7af0c56b993806fa47f77b607b1849a2172f
https://github.com/llvm/llvm-project/commit/070d7af0c56b993806fa47f77b607b1849a2172f
Author: Fangrui Song <i at maskray.me>
Date: 2024-03-27 (Wed, 27 Mar 2024)
Changed paths:
M lld/ELF/Driver.cpp
R lld/test/ELF/static-with-export-dynamic.s
M lld/test/ELF/weak-undef.s
Log Message:
-----------
[ELF] --export-dynamic: don't create dynamic sections for non-PIC static links
The CloudABI (removed from Clang Driver) change from
https://reviews.llvm.org/D29982 does not make sense. GNU ld and gold
don't create dynamic sections for a non-PIC static link when
--export-dynamic is specified.
Creating dynamic sections is harmful in this scenario because we would
consider undefined weak symbols preemptible and generate GLOB_DAT
relocations, breaking the expectation that non-PIC static links only
contain IRELATIVE relocations.
In addition, there are other options that export symbols
(--export-dynamic-symbol, --dynamic-list, etc). It does not make sense
to special case --export-dynamic.
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