Patchwork [1/3] ldso/mips: actually print results of each relocation

login
register
mail settings
Submitter Gregory Fong
Date April 21, 2014, 6:41 p.m.
Message ID <1398105721-23735-1-git-send-email-gregory.0xf0@gmail.com>
Download mbox | patch
Permalink /patch/340917/
State Accepted
Commit 33a59d1c1b9b33bad34e627e9e09035e5e7035f3
Headers show

Comments

Gregory Fong - April 21, 2014, 6:41 p.m.
The patched line was outside of the body of the loop over relocations
and so would only print the results of the last relocation, fix that.

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
---
 ldso/ldso/mips/elfinterp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
aldot - April 23, 2014, 2:06 p.m.
On 21 April 2014 20:41, Gregory Fong <gregory.0xf0@gmail.com> wrote:
> The patched line was outside of the body of the loop over relocations
> and so would only print the results of the last relocation, fix that.
>
> Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>

Applied, thanks!

Patch

diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c
index a90e163..8bcdddb 100644
--- a/ldso/ldso/mips/elfinterp.c
+++ b/ldso/ldso/mips/elfinterp.c
@@ -325,11 +325,11 @@  int _dl_parse_relocation_information(struct dyn_elf *xpnt,
 				_dl_exit(1);
 			}
 		}
-	}
 #if defined (__SUPPORT_LD_DEBUG__)
-	if (_dl_debug_reloc && _dl_debug_detail && reloc_addr)
-		_dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr);
+		if (_dl_debug_reloc && _dl_debug_detail && reloc_addr)
+			_dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr);
 #endif
+	}
 
 	return 0;
 }