Skip to content
Snippets Groups Projects
Select Git revision
  • 45caeaa5ac0b4b11784ac6f932c0ad4c6b67cda0
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

tcp_ipv6.c

Blame
  • capsule-shim.h 1.86 KiB
    // Copyright © 2017 Collabora Ltd
    
    // This file is part of libcapsule.
    
    // libcapsule is free software: you can redistribute it and/or modify
    // it under the terms of the GNU Lesser General Public License as
    // published by the Free Software Foundation; either version 2.1 of the
    // License, or (at your option) any later version.
    
    // libcapsule is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU Lesser General Public License for more details.
    
    // You should have received a copy of the GNU Lesser General Public
    // License along with libcapsule.  If not, see <http://www.gnu.org/licenses/>.
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <stdio.h>
    #include <execinfo.h>
    
    #include <capsule/capsule.h>
    
    #define UNVERSIONED_STUB(name) \
        void name (void) __attribute__((noreturn,visibility("default"))); \
        void name (void)                                   \
        {                                                  \
            fprintf(stderr, "! SHIM " #name " called\n" ); \
            backtrace_shim_call();                         \
            abort();                                       \
        }
    
    #define VERSIONED_STUB(name,version) \
        UNVERSIONED_STUB(name);
    
    static void
    backtrace_shim_call (void)
    {
        void *trace[16] = { NULL };
        int traced = 0;
        char **symbols = NULL;
    
        traced  = backtrace( trace, sizeof(trace)/sizeof(void *) );
        symbols = backtrace_symbols( trace, traced );
    
        for( int x = 1; x < traced; x++ )
            fprintf( stderr, "  -> %s\n", symbols[x] );
    
        free( symbols );
    }
    
    // We don't support versioned symbols properly yet, they need som
    // asm magic that looks like this and I'm not clear on the details:
    // __asm__(".symver _" #name "," #name #version)