Giter Site home page Giter Site logo

Comments (3)

BartmanAbyss avatar BartmanAbyss commented on May 22, 2024

This is just a side-effect of LTO/-fwhole-program: (see also [https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html])
Just put __attribute__((externally_visible)) in front of void HerpDerp() and it will work fine. However be careful and read the link above to avoid any strange duplication behavior.

from vscode-amiga-debug.

Slamy avatar Slamy commented on May 22, 2024

This solved the issue and I do have to admit that I wasn't aware of the effect of '-fwhole-program'. Still two things bother me:

  1. How can we avoid having people fall into the same trap? It will happen eventually.
  2. Why is the effect not observable via 'm68k-amiga-elf-objdump'? I would have understood the whole problem if the symbol was absent from the object file. Still this isn't the case. Maybe I'm missing the whole picture. I'm by far no compiler/linker expert.

from vscode-amiga-debug.

BartmanAbyss avatar BartmanAbyss commented on May 22, 2024
  1. I thought about that as well, but I'm not sure.. This was the first time this ever came up.
  2. Thing is, with LTO the object files aren't standard. They contain only intermediate code representation. The actual compiling is done during the linking step. This is what enables the huge benefits of LTO (project-wide code visibility for inlining, optimizing, etc.)

from vscode-amiga-debug.

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.