From d08f4552abdf7581cd4bdc73b636f6d5207b3621 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 7 May 2020 01:44:26 +0200 Subject: [PATCH] libdyld: fix pltrel_sz, remove debug output --- src/libdyld/src/image.rs | 2 +- src/libdyld/src/reloc.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libdyld/src/image.rs b/src/libdyld/src/image.rs index cf112ff..3f76bd0 100644 --- a/src/libdyld/src/image.rs +++ b/src/libdyld/src/image.rs @@ -155,7 +155,7 @@ impl Image { hash_chain: nbucket..nbucket + nchain, rel: rel_off..rel_off + rel_sz, rela: rela_off..rela_off + rela_sz, - pltrel: pltrel_off..pltrel_off + rela_sz, + pltrel: pltrel_off..pltrel_off + pltrel_sz, }) } diff --git a/src/libdyld/src/reloc.rs b/src/libdyld/src/reloc.rs index a295d34..0c0cb7a 100644 --- a/src/libdyld/src/reloc.rs +++ b/src/libdyld/src/reloc.rs @@ -1,5 +1,5 @@ use alloc::string::String; -use log::{debug, trace}; +use log::trace; use super::{ Arch, elf::*, @@ -92,7 +92,6 @@ pub fn relocate( arch: Arch, lib: &Library, rel: &R, resolve: &dyn Fn(&[u8]) -> Option ) -> Result<(), Error> { - // debug!("rel r_offset={:08X} r_info={:08X} r_addend={:08X}", rel.offset(), rel.r_info, rela.r_addend); let sym; if rel.sym_info() == 0 { sym = None; @@ -132,6 +131,5 @@ pub fn relocate( } } - debug!("rel_type={:?} write at {:08X} value {:08X}", rel_type, rel.offset(), value); lib.image.write(rel.offset(), value) }