<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/mono_item.rs, branch 1.66.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.66.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.66.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-09-01T14:54:27+00:00</updated>
<entry>
<title>Always import all tracing macros for the entire crate instead of piecemeal by module</title>
<updated>2022-09-01T14:54:27+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2022-08-31T13:09:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ee3c8350189de045ec71997874eaa6cebf99fbf3'/>
<id>urn:sha1:ee3c8350189de045ec71997874eaa6cebf99fbf3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update TypeVisitor paths</title>
<updated>2022-07-06T05:41:53+00:00</updated>
<author>
<name>Alan Egerton</name>
<email>eggyal@gmail.com</email>
</author>
<published>2022-06-17T12:15:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4f0a64736b94a84da4272867366b8679b585e603'/>
<id>urn:sha1:4f0a64736b94a84da4272867366b8679b585e603</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `in_band_lifetimes` from `rustc_codegen_llvm`</title>
<updated>2021-12-16T19:43:32+00:00</updated>
<author>
<name>LegionMammal978</name>
<email>mattlloydhouse@gmail.com</email>
</author>
<published>2021-12-14T18:49:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4937a55dfb19e804c3c974e5341b70dcd76192d4'/>
<id>urn:sha1:4937a55dfb19e804c3c974e5341b70dcd76192d4</id>
<content type='text'>
See #91867 for more information.
</content>
</entry>
<entry>
<title>Fix clippy lints</title>
<updated>2021-10-01T21:17:19+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2021-09-30T17:38:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=759eba0a08ef80f958e671e822ad02e2b5409946'/>
<id>urn:sha1:759eba0a08ef80f958e671e822ad02e2b5409946</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #88820 - hlopko:add_pie_relocation_model, r=petrochenkov</title>
<updated>2021-10-01T16:18:16+00:00</updated>
<author>
<name>Manish Goregaokar</name>
<email>manishsmail@gmail.com</email>
</author>
<published>2021-10-01T16:18:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6f1e93058137eb606cbee5ef778d30b379903f7c'/>
<id>urn:sha1:6f1e93058137eb606cbee5ef778d30b379903f7c</id>
<content type='text'>
Add `pie` as another `relocation-model` value

MCP: https://github.com/rust-lang/compiler-team/issues/461
</content>
</entry>
<entry>
<title>Add `pie` as another `relocation-model` value</title>
<updated>2021-10-01T06:06:42+00:00</updated>
<author>
<name>Marcel Hlopko</name>
<email>hlopko@google.com</email>
</author>
<published>2021-09-10T13:11:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=198d90786b9fb429928d70c423bad5d65374a532'/>
<id>urn:sha1:198d90786b9fb429928d70c423bad5d65374a532</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Querify `fn_abi_of_{fn_ptr,instance}`.</title>
<updated>2021-09-18T01:41:33+00:00</updated>
<author>
<name>Eduard-Mihai Burtescu</name>
<email>eddyb@lyken.rs</email>
</author>
<published>2021-09-01T21:29:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c1837ef1c58edd48c81341126ecc94e7adc5bd3d'/>
<id>urn:sha1:c1837ef1c58edd48c81341126ecc94e7adc5bd3d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ty::layout: replicate `layout_of` setup for `fn_abi_of_{fn_ptr,instance}`.</title>
<updated>2021-09-18T01:41:29+00:00</updated>
<author>
<name>Eduard-Mihai Burtescu</name>
<email>eddyb@lyken.rs</email>
</author>
<published>2021-09-01T21:09:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9b68304efc447a7bcd35b06511f6dfdfe9da16d'/>
<id>urn:sha1:e9b68304efc447a7bcd35b06511f6dfdfe9da16d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_target: move `LayoutOf` to `ty::layout`.</title>
<updated>2021-09-01T22:17:14+00:00</updated>
<author>
<name>Eduard-Mihai Burtescu</name>
<email>eddyb@lyken.rs</email>
</author>
<published>2021-08-30T14:38:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ce933f13fd5af5a344cbc435d94253eae9dc33d'/>
<id>urn:sha1:4ce933f13fd5af5a344cbc435d94253eae9dc33d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stop emitting the `dso_local` LLVM attribute for external symbols under the static relocation model on macOS.</title>
<updated>2021-08-21T00:10:41+00:00</updated>
<author>
<name>Patrick Walton</name>
<email>pcwalton@fb.com</email>
</author>
<published>2021-08-20T23:42:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c17b1904a90002b5bdb6e2fdcd76e61a1ad3cd7a'/>
<id>urn:sha1:c17b1904a90002b5bdb6e2fdcd76e61a1ad3cd7a</id>
<content type='text'>
This matches Clang's behavior:

https://github.com/llvm/llvm-project/blob/973cb2c326be9f256da0897c4d2ef117dc22761d/clang/lib/CodeGen/CodeGenModule.cpp#L1038-L1040

Even if `dso_local` were properly supported in this way on macOS, it seems
incorrect to add this annotation as liberally as we did. The `dso_local`
annotation is for symbols that ultimately end up in the same linkage unit, but
we were adding this annotation even for `static` values inside `extern` blocks
marked with `#[link(type="framework")]`, which should be considered dynamically
linked.  Note that Clang likewise avoids emitting `dso_local` for `dllimport`
symbols:

https://github.com/llvm/llvm-project/blob/973cb2c326be9f256da0897c4d2ef117dc22761d/clang/lib/CodeGen/CodeGenModule.cpp#L1005-L1007

This issue caused breakage in the `ring` crate, which links to a symbol defined
in `Security.framework` that ultimately resolves to address `0x0`:

https://github.com/briansmith/ring/blob/b94d61e044b42827fefd71d5f61e8c58a7659870/src/rand.rs#L390

For this symbol, the use of `dso_local` causes LLVM to emit a relocation of
type `X86_64_RELOC_SIGNED`, which is a 32-bit signed PC-relative offset. If the
binary is large enough, `0x0` might be out of range, and the link will fail.
Avoiding `dso_local` causes LLVM to use the GOT instead, emitting a relocation
of type `X86_64_RELOC_GOT_LOAD`, which will properly handle the large offset
and cause the link to succeed.

As a side note, the static relocation model is effectively deprecated for
security reasons on macOS, as it prohibits PIE. It's also completely
unsupported on Apple Silicon, so I don't think it's worth going to the effort
of properly supporting this model on that platform.
</content>
</entry>
</feed>
