FreeBSD Bugzilla – Attachment 222489 Details for
Bug 253557
lang/rust: unbreak RUST_BACKTRACE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1
bug253557.diff (text/plain), 25.69 KB, created by
Jan Beich
on 2021-02-16 14:53:07 UTC
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2021-02-16 14:53:07 UTC
Size:
25.69 KB
patch
obsolete
>From 2414b597a2fac665d01ea2cfd2c9f8e93aa5cd6a Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sun, 14 Feb 2021 17:03:38 +0000 >Subject: [PATCH] lang/rust: unbreak RUST_BACKTRACE=1 > >PR: 253557 >--- > lang/rust/Makefile | 2 +- > lang/rust/files/patch-backtrace | 918 ++++++++++++++++++++++++++++++++ > 2 files changed, 919 insertions(+), 1 deletion(-) > create mode 100644 lang/rust/files/patch-backtrace > >diff --git a/lang/rust/Makefile b/lang/rust/Makefile >index bf7e8c864c69..4eb17144cd3e 100644 >--- a/lang/rust/Makefile >+++ b/lang/rust/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= rust > PORTVERSION?= 1.50.0 >-PORTREVISION?= 0 >+PORTREVISION?= 1 > CATEGORIES= lang > MASTER_SITES= https://static.rust-lang.org/dist/:src \ > https://dev-static.rust-lang.org/dist/:src \ >diff --git a/lang/rust/files/patch-backtrace b/lang/rust/files/patch-backtrace >new file mode 100644 >index 000000000000..601a15201e8a >--- /dev/null >+++ b/lang/rust/files/patch-backtrace >@@ -0,0 +1,918 @@ >+https://github.com/rust-lang/rust/issues/78184 >+ >+--- library/backtrace/src/symbolize/gimli.rs.orig 2021-02-10 17:36:59 UTC >++++ library/backtrace/src/symbolize/gimli.rs >+@@ -361,6 +361,7 @@ cfg_if::cfg_if! { >+ } else if #[cfg(any( >+ target_os = "linux", >+ target_os = "fuchsia", >++ target_os = "freebsd", >+ ))] { >+ // Other Unix (e.g. Linux) platforms use ELF as an object file format >+ // and typically implement an API called `dl_iterate_phdr` to load >+--- vendor/libc-0.2.77/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.77/src/unix/bsd/freebsdlike/mod.rs >+@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; >+ pub type id_t = i64; >+ pub type vm_size_t = ::uintptr_t; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >++// link.h >++ >+ #[cfg_attr(feature = "extra_traits", derive(Debug))] >+ pub enum timezone {} >+ impl ::Copy for timezone {} >+@@ -233,6 +265,43 @@ s! { >+ pub piod_addr: *mut ::c_void, >+ pub piod_len: ::size_t, >+ } >++ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -1514,6 +1583,18 @@ extern "C" { >+ >+ pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; >+ pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; >++ >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "rt")] >+--- vendor/libc-0.2.77/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.77/src/unix/bsd/netbsdlike/netbsd/mod.rs >+@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; >+ pub type lwpid_t = ::c_uint; >+ pub type shmatt_t = ::c_uint; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ impl siginfo_t { >+ pub unsafe fn si_value(&self) -> ::sigval { >+ #[repr(C)] >+@@ -341,6 +371,42 @@ s! { >+ pub time_state: ::c_int, >+ } >+ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -1988,6 +2054,19 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ >++ // link.h >++ >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "util")] >+--- vendor/libc-0.2.77/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.77/src/unix/bsd/netbsdlike/openbsd/mod.rs >+@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; >+ pub type pthread_rwlockattr_t = *mut ::c_void; >+ pub type caddr_t = *mut ::c_char; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ s! { >+ pub struct glob_t { >+ pub gl_pathc: ::size_t, >+@@ -321,6 +351,38 @@ s! { >+ __shm_ctimensec: c_long, >+ pub shm_internal: *mut ::c_void, >+ } >++ >++ // elf.h >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ } >+ } >+ >+ impl siginfo_t { >+@@ -1480,6 +1542,17 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ cfg_if! { >+--- vendor/libc-0.2.79/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.79/src/unix/bsd/freebsdlike/mod.rs >+@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; >+ pub type id_t = i64; >+ pub type vm_size_t = ::uintptr_t; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >++// link.h >++ >+ #[cfg_attr(feature = "extra_traits", derive(Debug))] >+ pub enum timezone {} >+ impl ::Copy for timezone {} >+@@ -233,6 +265,43 @@ s! { >+ pub piod_addr: *mut ::c_void, >+ pub piod_len: ::size_t, >+ } >++ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -1514,6 +1583,18 @@ extern "C" { >+ >+ pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; >+ pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; >++ >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "rt")] >+--- vendor/libc-0.2.79/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.79/src/unix/bsd/netbsdlike/netbsd/mod.rs >+@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; >+ pub type lwpid_t = ::c_uint; >+ pub type shmatt_t = ::c_uint; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ impl siginfo_t { >+ pub unsafe fn si_value(&self) -> ::sigval { >+ #[repr(C)] >+@@ -341,6 +371,42 @@ s! { >+ pub time_state: ::c_int, >+ } >+ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -1990,6 +2056,19 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ >++ // link.h >++ >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "util")] >+--- vendor/libc-0.2.79/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc-0.2.79/src/unix/bsd/netbsdlike/openbsd/mod.rs >+@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; >+ pub type pthread_rwlockattr_t = *mut ::c_void; >+ pub type caddr_t = *mut ::c_char; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ s! { >+ pub struct glob_t { >+ pub gl_pathc: ::size_t, >+@@ -321,6 +351,38 @@ s! { >+ __shm_ctimensec: c_long, >+ pub shm_internal: *mut ::c_void, >+ } >++ >++ // elf.h >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ } >+ } >+ >+ impl siginfo_t { >+@@ -1482,6 +1544,17 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ cfg_if! { >+--- vendor/libc/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc/src/unix/bsd/freebsdlike/mod.rs >+@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; >+ pub type id_t = i64; >+ pub type vm_size_t = ::uintptr_t; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >++// link.h >++ >+ #[cfg_attr(feature = "extra_traits", derive(Debug))] >+ pub enum timezone {} >+ impl ::Copy for timezone {} >+@@ -233,6 +265,43 @@ s! { >+ pub piod_addr: *mut ::c_void, >+ pub piod_len: ::size_t, >+ } >++ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -1514,6 +1583,18 @@ extern "C" { >+ >+ pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; >+ pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; >++ >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "rt")] >+--- vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs >+@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; >+ pub type lwpid_t = ::c_uint; >+ pub type shmatt_t = ::c_uint; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ impl siginfo_t { >+ pub unsafe fn si_value(&self) -> ::sigval { >+ #[repr(C)] >+@@ -341,6 +371,42 @@ s! { >+ pub time_state: ::c_int, >+ } >+ >++ // elf.h >++ >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ pub dlpi_adds: ::c_ulonglong, >++ pub dlpi_subs: ::c_ulonglong, >++ pub dlpi_tls_modid: usize, >++ pub dlpi_tls_data: *mut ::c_void, >++ } >+ } >+ >+ s_no_extra_traits! { >+@@ -2002,6 +2068,19 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ >++ // link.h >++ >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ #[link(name = "util")] >+--- vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC >++++ vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs >+@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; >+ pub type pthread_rwlockattr_t = *mut ::c_void; >+ pub type caddr_t = *mut ::c_char; >+ >++// elf.h >++ >++pub type Elf32_Addr = u32; >++pub type Elf32_Half = u16; >++pub type Elf32_Lword = u64; >++pub type Elf32_Off = u32; >++pub type Elf32_Sword = i32; >++pub type Elf32_Word = u32; >++ >++pub type Elf64_Addr = u64; >++pub type Elf64_Half = u16; >++pub type Elf64_Lword = u64; >++pub type Elf64_Off = u64; >++pub type Elf64_Sword = i32; >++pub type Elf64_Sxword = i64; >++pub type Elf64_Word = u32; >++pub type Elf64_Xword = u64; >++ >++cfg_if! { >++ if #[cfg(target_pointer_width = "64")] { >++ type Elf_Addr = Elf64_Addr; >++ type Elf_Half = Elf64_Half; >++ type Elf_Phdr = Elf64_Phdr; >++ } else if #[cfg(target_pointer_width = "32")] { >++ type Elf_Addr = Elf32_Addr; >++ type Elf_Half = Elf32_Half; >++ type Elf_Phdr = Elf32_Phdr; >++ } >++} >++ >+ s! { >+ pub struct glob_t { >+ pub gl_pathc: ::size_t, >+@@ -321,6 +351,38 @@ s! { >+ __shm_ctimensec: c_long, >+ pub shm_internal: *mut ::c_void, >+ } >++ >++ // elf.h >++ pub struct Elf32_Phdr { >++ pub p_type: Elf32_Word, >++ pub p_offset: Elf32_Off, >++ pub p_vaddr: Elf32_Addr, >++ pub p_paddr: Elf32_Addr, >++ pub p_filesz: Elf32_Word, >++ pub p_memsz: Elf32_Word, >++ pub p_flags: Elf32_Word, >++ pub p_align: Elf32_Word, >++ } >++ >++ pub struct Elf64_Phdr { >++ pub p_type: Elf64_Word, >++ pub p_flags: Elf64_Word, >++ pub p_offset: Elf64_Off, >++ pub p_vaddr: Elf64_Addr, >++ pub p_paddr: Elf64_Addr, >++ pub p_filesz: Elf64_Xword, >++ pub p_memsz: Elf64_Xword, >++ pub p_align: Elf64_Xword, >++ } >++ >++ // link.h >++ >++ pub struct dl_phdr_info { >++ pub dlpi_addr: Elf_Addr, >++ pub dlpi_name: *const ::c_char, >++ pub dlpi_phdr: *const Elf_Phdr, >++ pub dlpi_phnum: Elf_Half, >++ } >+ } >+ >+ impl siginfo_t { >+@@ -1482,6 +1544,17 @@ extern "C" { >+ needle: *const ::c_void, >+ needlelen: ::size_t, >+ ) -> *mut ::c_void; >++ // #include <link.h> >++ pub fn dl_iterate_phdr( >++ callback: ::Option< >++ unsafe extern "C" fn( >++ info: *mut dl_phdr_info, >++ size: usize, >++ data: *mut ::c_void, >++ ) -> ::c_int, >++ >, >++ data: *mut ::c_void, >++ ) -> ::c_int; >+ } >+ >+ cfg_if! {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253557
: 222489