GithubHelp home page GithubHelp logo

Comments (2)

pali avatar pali commented on July 20, 2024

Probably you need to mark your __cxa_throw implementation with __declspec(dllexport).

Then main problem is that symbols on PE targets are resolved at compile/link time. So once you link symbol A in your executable B with library C then always this combination would be used.

RTLD_NEXT is locating symbol in executable at runtime. So to make it working, you need to have loaded one symbol name more times.

As __cxa_throw is in libstdc++.a you have to avoid using libstdc++ at compile/link time if you want to use your __cxa_throw implementation. But I guess you cannot avoid it as you want to use C++.

Anyway, I'm not sure if you can use dlsym/RTLD_NEXT for static linked libraries. I think it needs working with dynamic DLL libraries. And this probably applies also for ELF targets. On Linux it is working because you are for sure linking std library dynamically.

from dlfcn-win32.

pali avatar pali commented on July 20, 2024

dlsym/dlfcn is for dynamic linked code/libraries. Nott for static linked .a libraries. So in above setup with static linked libstdc++.a library, dlsym would not work.

from dlfcn-win32.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.