From 96785572631e10b04b11f28ddfa7ff68776ca97e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vivek=20Das=C2=A0Mohapatra?= <vivek@collabora.co.uk>
Date: Wed, 24 May 2017 20:26:09 +0100
Subject: [PATCH] capsule-dlmopen.c: explain what some of the ELF parameters
 mean

---
 capsule/capsule-dlmopen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/capsule/capsule-dlmopen.c b/capsule/capsule-dlmopen.c
index 404eff269..aade4bc42 100644
--- a/capsule/capsule-dlmopen.c
+++ b/capsule/capsule-dlmopen.c
@@ -1320,6 +1320,10 @@ wrap (const char *name,
     // well formed entries into the mmap()ed DSO region.
     // (tbf if the linker is putting duff entries here we're boned anyway)
     //
+    // dyn is the address of the dynamic section
+    // base is the start of the program header in memory
+    // start should be the offset from the program header to its dyn section
+    //
     // the utility functions expect an upper bound though so set that to
     // something suitably large:
     size_t size = SIZE_MAX - base - (ElfW(Addr)) dyn;
-- 
GitLab