Changeset 7db39f7 for libcfa


Ignore:
Timestamp:
Jan 11, 2024, 9:19:17 AM (4 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
a3f820b, ee16f8fc
Parents:
8655363
Message:

second attempt to interpose dl_iterate_phdr with disable/enable interrupt protection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/interpose.cfa

    r8655363 r7db39f7  
    1010// Created On       : Wed Mar 29 16:10:31 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan  4 11:04:06 2024
    13 // Update Count     : 215
     12// Last Modified On : Thu Jan 11 09:09:34 2024
     13// Update Count     : 217
    1414//
    1515
     
    1818extern "C" {
    1919#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#include <link.h>                                                                               // dl_iterate_phdr
    2321#include <execinfo.h>                                                                   // backtrace, messages
    2422}
     
    158156
    159157extern "C" int dl_iterate_phdr( int (* callback)( struct dl_phdr_info *, size_t, void * ), void * data ) {
    160         // assert( RealRtn::dl_iterate_phdr != nullptr );
    161158        disable_interrupts();
    162         int ret = __cabi_libc.dl_iterate_phdr( callback, data );
     159        int ret = __cabi_libc.dl_iterate_phdr( callback, data ); // call real routine
    163160        enable_interrupts( false );
    164161        return ret;
Note: See TracChangeset for help on using the changeset viewer.