diff options
author | Fangrui Song <i@maskray.me> | 2024-08-22 09:20:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 09:20:53 -0700 |
commit | eb549da9e5c1e626edb14ba9ce43e46ad3d088af (patch) | |
tree | 0ecb0d10d23799e9ff9ba4168de0f8541458f74d /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 83fc989a227a0cafb945307d4f0d68a4df864dc1 (diff) | |
download | llvm-eb549da9e5c1e626edb14ba9ce43e46ad3d088af.zip llvm-eb549da9e5c1e626edb14ba9ce43e46ad3d088af.tar.gz llvm-eb549da9e5c1e626edb14ba9ce43e46ad3d088af.tar.bz2 |
[Driver] Add -Wa, options -mmapsyms={default,implicit}
-Wa,-mmapsyms=implicit enables the alternative mapping symbol scheme
discussed at #99718.
While not conforming to the current aaelf64 ABI, the option is
invaluable for those with full control over their toolchain, no reliance
on weird relocatable files, and a strong focus on minimizing both
relocatable and executable sizes.
The option is discouraged when portability of the relocatable objects is
a concern.
https://maskray.me/blog/2024-07-21-mapping-symbols-rethinking-for-efficiency
elaborates the risk.
Pull Request: https://github.com/llvm/llvm-project/pull/104542
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 34c0881..fdd89ed 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -471,6 +471,7 @@ static bool initTargetOptions(DiagnosticsEngine &Diags, Options.MCOptions.Dwarf64 = CodeGenOpts.Dwarf64; Options.MCOptions.PreserveAsmComments = CodeGenOpts.PreserveAsmComments; Options.MCOptions.Crel = CodeGenOpts.Crel; + Options.MCOptions.ImplicitMapSyms = CodeGenOpts.ImplicitMapSyms; Options.MCOptions.X86RelaxRelocations = CodeGenOpts.X86RelaxRelocations; Options.MCOptions.CompressDebugSections = CodeGenOpts.getCompressDebugSections(); |