[all-commits] [llvm/llvm-project] fcbbcf: [llvm-objcopy] [COFF] Ignore associative sections ...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Wed Jul 30 06:39:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fcbbcffd2e6ea30097809ba0cd1e3b6003fa862f
https://github.com/llvm/llvm-project/commit/fcbbcffd2e6ea30097809ba0cd1e3b6003fa862f
Author: Martin Storsjö <martin at martin.st>
Date: 2025-07-30 (Wed, 30 Jul 2025)
Changed paths:
M llvm/lib/ObjCopy/COFF/COFFReader.cpp
A llvm/test/tools/llvm-objcopy/COFF/exe-bogus-assoc.test
Log Message:
-----------
[llvm-objcopy] [COFF] Ignore associative sections in executables (#151143)
COFF associative sections is a feature where relocatable object files
can have section snippets marked as related to another section snippet,
so they are kept or discarded in relation to that other section snippet.
When llvm-objcopy removes sections, it also removes sections that are
marked as associative to the removed section (as the associative
sections otherwise would end up orphaned).
In a linked executable module (EXE or DLL), section associativity is
meaningless - thus, we should ignore those fields from the input.
After linking, GNU ld keeps the SectionDefinition auxillary part of
symbols intact as it was in the source object file, which means that it
references section numbers in the source object files.
This fixes https://github.com/llvm/llvm-project/issues/53433.
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