[PATCH 1/8] ARM: aarch64: Fixup relocation table for the second relocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case we want to relocate the binary multiple times we have to
adjust the relocation table itself for any further relocations.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/cpu/common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c
index 4d957da1dc..c81b2b3791 100644
--- a/arch/arm/cpu/common.c
+++ b/arch/arm/cpu/common.c
@@ -84,6 +84,8 @@ void relocate_to_current_adr(void)
 			unsigned long *fixup = (unsigned long *)(rel->r_offset + offset);
 
 			*fixup = rel->r_addend + offset;
+			rel->r_addend += offset;
+			rel->r_offset += offset;
 		} else {
 			putc_ll('>');
 			puthex_ll(rel->r_info);
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux