On 09/16/2017 05:00 PM, Yubin Ruan wrote:
diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3 index b5b75e8..35107da 100644 --- a/man3/dl_iterate_phdr.3 +++ b/man3/dl_iterate_phdr.3 @@ -121,10 +121,9 @@ header files.) .PP The .I dlpi_addr -field indicates the base address of the shared object -(i.e., the difference between the virtual memory address of -the shared object and the offset of that object in the file -from which it was loaded). +field indicates the base address that is mapped at runtime. +For an executable this field is always 0 and for a shared +object it is the address where the shared object is mapped.
The part about executables is not true. The most common case probably is PIE executables. You see this if you compile the modified test program with -fpie -pie on a recent enough toolchain.
Thanks, Florian -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html