[all-commits] [llvm/llvm-project] e115c0: [ELF] Reject certain unknown section types (#85173)
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Mar 15 09:50:45 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e115c00565be88677e8b7fe021a3e242249c67b8
https://github.com/llvm/llvm-project/commit/e115c00565be88677e8b7fe021a3e242249c67b8
Author: Fangrui Song <i at maskray.me>
Date: 2024-03-15 (Fri, 15 Mar 2024)
Changed paths:
M lld/ELF/Config.h
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/Options.td
M lld/docs/ld.lld.1
M lld/test/ELF/incompatible-section-types2.s
M lld/test/ELF/linkerscript/custom-section-type.s
A lld/test/ELF/unknown-section.test
Log Message:
-----------
[ELF] Reject certain unknown section types (#85173)
Unknown section sections may require special linking rules, and
rejecting such sections for older linkers may be desired. For example,
if we introduce a new section type to replace a control structure (e.g.
relocations), it would be nice for older linkers to reject the new
section type. GNU ld allows certain unknown section types:
* [SHT_LOUSER,SHT_HIUSER] and non-SHF_ALLOC
* [SHT_LOOS,SHT_HIOS] and non-SHF_OS_NONCONFORMING
but reports errors and stops linking for others (unless
--no-warn-mismatch is specified). Port its behavior. For convenience, we
additionally allow all [SHT_LOPROC,SHT_HIPROC] types so that we don't
have to hard code all known types for each processor.
Close https://github.com/llvm/llvm-project/issues/84812
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