[all-commits] [llvm/llvm-project] 42e3f9: [MC] Change ELFOSABI_NONE to ELFOSABI_GNU for SHF_...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Mar 9 10:00:11 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42e3f97a9dd3a439f63a733c4ee909cba6b77e49
https://github.com/llvm/llvm-project/commit/42e3f97a9dd3a439f63a733c4ee909cba6b77e49
Author: Fangrui Song <i at maskray.me>
Date: 2021-03-09 (Tue, 09 Mar 2021)
Changed paths:
M lld/test/ELF/gc-sections-retain.s
M llvm/include/llvm/MC/MCObjectWriter.h
M llvm/lib/MC/ELFObjectWriter.cpp
M llvm/lib/MC/MCELFStreamer.cpp
M llvm/test/MC/ELF/section-gnu.s
Log Message:
-----------
[MC] Change ELFOSABI_NONE to ELFOSABI_GNU for SHF_GNU_RETAIN
GNU ld does not give SHF_GNU_RETAIN GC root semantics for ELFOSABI_NONE.
(https://sourceware.org/pipermail/binutils/2021-March/115581.html)
This allows GNU ld to interpret SHF_GNU_RETAIN and avoids a gold quirk
https://sourceware.org/bugzilla/show_bug.cgi?id=27490
Because ELFObjectWriter is in an anonymous namespace, I have to place
`markGnuAbi` in the parent MCObjectWriter.
Differential Revision: https://reviews.llvm.org/D97976
More information about the All-commits
mailing list