|
|
Строка 2: |
Строка 2: |
| === 2020-11 === | | === 2020-11 === |
| | | |
| + | * 2020-11-05, 02:23:09: [https://djangopackages.org/grids/g/perms/ Django Packages : Permissions] |
| * 2020-11-04, 02:25:18: [http://ru.manpages.org/dl_iterate_phdr/3 man dl_iterate_phdr (3): обход списка общих объектов] | | * 2020-11-04, 02:25:18: [http://ru.manpages.org/dl_iterate_phdr/3 man dl_iterate_phdr (3): обход списка общих объектов] |
| *: <html><span class="hljs-preprocessor">#<span class="hljs-keyword">define</span> _GNU_SOURCE</span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <link.h></span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <stdlib.h></span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <stdio.h></span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">int</span> callback(<span class="hljs-keyword">struct</span> dl_phdr_info *info, size_t size, <span class="hljs-keyword">void</span> *data) { <span class="hljs-keyword">int</span> j; <span class="hljs-built_in">printf</span>(<span class="hljs-string">"имя=%s (%d сегментов)\n"</span>, info->dlpi_name, info->dlpi_phnum); <span class="hljs-keyword">for</span> (j = <span class="hljs-number">0</span>; j < info->dlpi_phnum; j++) <span class="hljs-built_in">printf</span>(<span class="hljs-string">"\t\t заголовок %2d: адрес=%10p\n"</span>, j, (<span class="hljs-keyword">void</span> *) (info->dlpi_addr + info->dlpi_phdr[j].p_vaddr)); <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>; } <span class="hljs-keyword">int</span> main(<span class="hljs-keyword">int</span> argc, <span class="hljs-keyword">char</span> *argv[]) { dl_iterate_phdr(callback, NULL); <span class="hljs-built_in">exit</span>(EXIT_SUCCESS); }</html> | | *: <html><span class="hljs-preprocessor">#<span class="hljs-keyword">define</span> _GNU_SOURCE</span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <link.h></span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <stdlib.h></span> <span class="hljs-preprocessor">#<span class="hljs-keyword">include</span> <stdio.h></span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">int</span> callback(<span class="hljs-keyword">struct</span> dl_phdr_info *info, size_t size, <span class="hljs-keyword">void</span> *data) { <span class="hljs-keyword">int</span> j; <span class="hljs-built_in">printf</span>(<span class="hljs-string">"имя=%s (%d сегментов)\n"</span>, info->dlpi_name, info->dlpi_phnum); <span class="hljs-keyword">for</span> (j = <span class="hljs-number">0</span>; j < info->dlpi_phnum; j++) <span class="hljs-built_in">printf</span>(<span class="hljs-string">"\t\t заголовок %2d: адрес=%10p\n"</span>, j, (<span class="hljs-keyword">void</span> *) (info->dlpi_addr + info->dlpi_phdr[j].p_vaddr)); <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>; } <span class="hljs-keyword">int</span> main(<span class="hljs-keyword">int</span> argc, <span class="hljs-keyword">char</span> *argv[]) { dl_iterate_phdr(callback, NULL); <span class="hljs-built_in">exit</span>(EXIT_SUCCESS); }</html> |