Skip to content

Commit 9273381

Browse files
committed
Address comments
1 parent 24b7599 commit 9273381

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lld/COFF/Writer.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,15 +2586,11 @@ void Writer::createDynamicRelocs() {
25862586
coffHeaderOffset + offsetof(coff_file_header, Machine),
25872587
AMD64);
25882588

2589-
if (ctx.symtab.entry || ctx.hybridSymtab->entry) {
2590-
Defined *entrySym = ctx.hybridSymtab->entry
2591-
? dyn_cast<Defined>(ctx.hybridSymtab->entry)
2592-
: nullptr;
2589+
if (ctx.symtab.entry != ctx.hybridSymtab->entry)
25932590
ctx.dynamicRelocs->add(IMAGE_DVRT_ARM64X_FIXUP_TYPE_VALUE, sizeof(uint32_t),
25942591
peHeaderOffset +
25952592
offsetof(pe32plus_header, AddressOfEntryPoint),
2596-
entrySym);
2597-
}
2593+
cast_or_null<Defined>(ctx.hybridSymtab->entry));
25982594

25992595
// Set the hybrid load config to the EC load config.
26002596
ctx.dynamicRelocs->add(IMAGE_DVRT_ARM64X_FIXUP_TYPE_VALUE, sizeof(uint32_t),

0 commit comments

Comments
 (0)