Skip to content

Commit be5c282

Browse files
committed
WIP: Add always present image tag
1 parent cc4979f commit be5c282

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

objc2/src/macros.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ macro_rules! sel {
7777
fn objc_static_workaround() -> $crate::runtime::Sel {
7878
const X: &[u8] = $sel.as_bytes();
7979

80-
$crate::image_info();
80+
#[link_section = "__DATA,__objc_imageinfo,regular,no_dead_strip"]
81+
#[export_name = concat!("\x01L_OBJC_IMAGE_INFO_", $crate::__proc_macros::hash_idents!($($idents)+))]
82+
#[used]
83+
static _IMAGE_TAG: [u32; 2] = [0, 0];
8184

8285
#[link_section = "__TEXT,__objc_methname,cstring_literals"]
8386
#[export_name = concat!("\x01L_OBJC_METH_VAR_NAME_", $crate::__proc_macros::hash_idents!($($idents)+))]

0 commit comments

Comments
 (0)