[PATCH] D58739: [COFF] Add address-taken import thunks to the fid table

David Major via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 15:27:32 PST 2019


dmajor added inline comments.


================
Comment at: lld/test/COFF/guardcf-thunk.s:28
+        .section .text,"rx"
+        .def     main; .scl    2; .type   32; .endef
+        .global main
----------------
rnk wrote:
> I think `IMAGE_SYM_DTYPE_FUNCTION` is set by the .type directive in this .def/.endef block. I guess what we're doing doesn't match MSVC, but it also seems reasonable. Is the Rust function written in assembly, or is it emitted in LLVM? We should be setting the appropriate type...
The function is `on_tls_callback` at https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/thread_local.rs#L201.

(It's unclear to me if the linker magic related to TLS callbacks is related to this issue. This is just the first function we fail at. I don't know if there are more "normal" functions that we'd fail on after it.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58739





More information about the llvm-commits mailing list