uftrace: update to 0.9.1.

This commit is contained in:
Leah Neukirchen 2018-11-11 17:59:24 +01:00
parent fcd5796c82
commit a525431bc3
2 changed files with 2 additions and 46 deletions

View file

@ -1,44 +0,0 @@
--- arch/i386/mcount-dynamic.c.orig
+++ arch/i386/mcount-dynamic.c
@@ -22,11 +22,11 @@
size_t trampoline_size = 16;
/* find unused 16-byte at the end of the code segment */
- mdi->trampoline = ALIGN(mdi->addr + mdi->size, PAGE_SIZE) - trampoline_size;
+ mdi->trampoline = ALIGN(mdi->text_addr + mdi->text_size, PAGE_SIZE) - trampoline_size;
- if (unlikely(mdi->trampoline < mdi->addr + mdi->size)) {
+ if (unlikely(mdi->trampoline < mdi->text_addr + mdi->text_size)) {
mdi->trampoline += trampoline_size;
- mdi->size += PAGE_SIZE;
+ mdi->text_size += PAGE_SIZE;
pr_dbg2("adding a page for fentry trampoline at %#lx\n",
mdi->trampoline);
@@ -35,7 +35,7 @@
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
}
- if (mprotect((void *)mdi->addr, mdi->size, PROT_READ | PROT_WRITE)) {
+ if (mprotect((void *)mdi->text_addr, mdi->text_size, PROT_READ | PROT_WRITE)) {
pr_dbg("cannot setup trampoline due to protection: %m\n");
return -1;
}
@@ -49,7 +49,7 @@
void mcount_cleanup_trampoline(struct mcount_dynamic_info *mdi)
{
- if (mprotect((void *)mdi->addr, mdi->size, PROT_EXEC))
+ if (mprotect((void *)mdi->text_addr, mdi->text_size, PROT_EXEC))
pr_err("cannot restore trampoline due to protection");
}
@@ -58,7 +58,7 @@
static unsigned long get_target_addr(struct mcount_dynamic_info *mdi, unsigned long addr)
{
while (mdi) {
- if (mdi->addr <= addr && addr < mdi->addr + mdi->size)
+ if (mdi->text_addr <= addr && addr < mdi->text_addr + mdi->text_size)
return mdi->trampoline - (addr + CALL_INSN_SIZE);
mdi = mdi->next;

View file

@ -1,6 +1,6 @@
# Template file for 'uftrace'
pkgname=uftrace
version=0.9
version=0.9.1
revision=1
build_style=gnu-configure
hostmakedepends="pandoc pkg-config"
@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-only"
homepage="https://github.com/namhyung/uftrace"
distfiles="https://github.com/namhyung/uftrace/archive/v${version}.tar.gz"
checksum=73eb0b24e1e0c1bcd49cccf0dc4783f2b9110fa681219d9b8cd6ed51f7c6fb78
checksum=d195b630a2113f138b900d1b6dbc073ec3326c62eef233468123f4028988b39d
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" argp-standalone"; export LDFLAGS=-largp;;