[PATCH] D145208: [COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 12:33:01 PDT 2023


efriedma added reviewers: MaskRay, compnerd.
efriedma added inline comments.


================
Comment at: llvm/test/MC/COFF/alias.s:27
 // CHECK:        0x8 IMAGE_REL_I386_DIR32 global_aliased_to_local
-// CHECK:        0xC IMAGE_REL_I386_DIR32 external2
+// CHECK:        0xC IMAGE_REL_I386_DIR32 weak_aliased_to_external
 // CHECK:      ]
----------------
mstorsjo wrote:
> This looks curious - why does this change here?
We were resolving ".long weak_aliased_to_external" to external2; the new isWeakExternal() checks prevent us from resolving that, I think.  I wasn't really trying for that, specifically... but I think it's the behavior we want?  (If a function refers to weak_aliased_to_external, we should allow it to be overridden whether or not the reference is in the same object file.)


================
Comment at: llvm/test/MC/COFF/weak-anti-dep.s:23
+// CHECK-NEXT:      Linked: b (8)
+// CHECK-NEXT:      Search: 0x4
+// CHECK-NEXT:    }
----------------
mstorsjo wrote:
> I guess it'd be good to teach `llvm-readobj` about this new mode too.
You mean you want a readable name for the "0x4"?  Not sure where that comes from, but I can look.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145208/new/

https://reviews.llvm.org/D145208



More information about the llvm-commits mailing list