Giter VIP home page Giter VIP logo

Comments (4)

tehKaiN avatar tehKaiN commented on August 11, 2024

So why that's a "won't fix"? As a less experienced programmer I'm a bit confused and worried that such simple thing as declaring a constant before function may cause crashes in my apps. If it's that hard to fix, how does one protect from such unexpected behavior?

from amiga-gcc.

tehKaiN avatar tehKaiN commented on August 11, 2024

okay, so we had a discussion on slack about it and @michalsc told me that's dangerous only when not using default startup code. So not a problem for me... for now. ;)

from amiga-gcc.

michalsc avatar michalsc commented on August 11, 2024

Maybe a tiny fix, where const and any other read only data (which would normally go into .rodata section in ELF) is stored in HUNK_DATA section instead of HUNK_CODE? If necessary one could enforce variables/structures into code section anyway, using attribute((section()))...

Well, I myself can live with "wontfix", my issue was thought rather towards unexperienced developers who may waste hours trying to figure out why the code crashes without any apparent reason.

from amiga-gcc.

bebbo avatar bebbo commented on August 11, 2024

It's a good feature to put const data into the text (code) section, since it allows pcrel addressing.
For the rare cases providing an own startup code you can spend the few bytes to add a bra __entrypoint as first insn.

Tiny effort for folks with own startup.
Way less effort for me.
Good!

from amiga-gcc.

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.