diff --git a/capsule/capsule-dlmopen.c b/capsule/capsule-dlmopen.c index 404eff269d7fd0f8f3da385ab1a17cf73988d30f..aade4bc42a46237ee4d7e3466c860302c1a78ce1 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;