using namespace llvm::object;
using namespace llvm::support::endian;
using llvm::COFF::ImportHeader;
+using llvm::COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE;
using llvm::RoundUpToAlignment;
using llvm::sys::fs::identify_magic;
using llvm::sys::fs::file_magic;
auto *Aux = (const coff_aux_weak_external *)AuxP;
return new (Alloc) Undefined(Name, &SparseSymbolBodies[Aux->TagIndex]);
}
+ // Handle associative sections
if (IsFirst && AuxP) {
if (Chunk *C = SparseChunks[Sym.getSectionNumber()]) {
auto *Aux = reinterpret_cast<const coff_aux_section_definition *>(AuxP);
- auto *Parent =
+ if (Aux->Selection == IMAGE_COMDAT_SELECT_ASSOCIATIVE) {
+ auto *Parent =
(SectionChunk *)(SparseChunks[Aux->getNumber(Sym.isBigObj())]);
- if (Parent)
- Parent->addAssociative((SectionChunk *)C);
+ if (Parent)
+ Parent->addAssociative((SectionChunk *)C);
+ }
}
}
if (Chunk *C = SparseChunks[Sym.getSectionNumber()])
; TEXT-11-NEXT: movl $2, %eax
; TEXT-11-NEXT: retq
-; HEADERS-01: AddressOfEntryPoint: 0x1000
+; HEADERS-01: AddressOfEntryPoint: 0x2000
; TEXT-01: Disassembly of section .text:
; TEXT-01-NEXT: .text:
; TEXT-01-NEXT: subq $40, %rsp
; TEXT-01-NEXT: retq
; TEXT-01-NEXT: retq
-; HEADERS-10: AddressOfEntryPoint: 0x1010
+; HEADERS-10: AddressOfEntryPoint: 0x2010
; TEXT-10: Disassembly of section .text:
; TEXT-10-NEXT: .text:
; TEXT-10-NEXT: retq