- Timestamp:
- Jan 4, 2024, 12:05:02 PM (14 months ago)
- Branches:
- master
- Children:
- e7eb1f0
- Parents:
- 4aae2bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/interpose.cfa ¶
r4aae2bd re0cc9e0 10 10 // Created On : Wed Mar 29 16:10:31 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 27 21:09:03 202313 // Update Count : 19612 // Last Modified On : Thu Jan 4 11:04:06 2024 13 // Update Count : 215 14 14 // 15 15 … … 18 18 extern "C" { 19 19 #include <dlfcn.h> // dlopen, dlsym 20 //#include <link.h> // dl_iterate_phdr 21 struct dl_phdr_info; 22 int dl_iterate_phdr( int (*)( struct dl_phdr_info *, size_t, void * ), void * ); 20 23 #include <execinfo.h> // backtrace, messages 21 24 } … … 23 26 #include "bits/defs.hfa" 24 27 #include "bits/signal.hfa" // sigHandler_? 28 #include "concurrency/kernel/fwd.hfa" // disable_interrupts, enable_interrupts 25 29 #include "startup.hfa" // STARTUP_PRIORITY_CORE 26 30 #include <assert.h> … … 87 91 void (* exit)( int ) __attribute__(( __noreturn__ )); 88 92 void (* abort)( void ) __attribute__(( __noreturn__ )); 93 int (* dl_iterate_phdr)( int (*)( struct dl_phdr_info *, size_t, void * ), void * ); 89 94 } __cabi_libc; 90 95 … … 102 107 #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" 103 108 INTERPOSE_LIBC( abort, version ); 104 INTERPOSE_LIBC( exit , version ); 109 INTERPOSE_LIBC( exit, version ); 110 INTERPOSE_LIBC( dl_iterate_phdr, version ); 105 111 #pragma GCC diagnostic pop 106 112 … … 150 156 } 151 157 } 158 159 extern "C" int dl_iterate_phdr( int (* callback)( struct dl_phdr_info *, size_t, void * ), void * data ) { 160 // assert( RealRtn::dl_iterate_phdr != nullptr ); 161 disable_interrupts(); 162 int ret = __cabi_libc.dl_iterate_phdr( callback, data ); 163 enable_interrupts( false ); 164 return ret; 165 } // dl_iterate_phdr 152 166 153 167 //=============================================================================================
Note: See TracChangeset
for help on using the changeset viewer.