Giter VIP home page Giter VIP logo

Comments (6)

graphitemaster avatar graphitemaster commented on June 29, 2024

I think it may be possible to reset to the .text.

from incbin.

Theldus avatar Theldus commented on June 29, 2024

Maybe .pushsection and .popsection?, I haven't used these before, so maybe I'm equivocated.

from incbin.

hhoffstaette avatar hhoffstaette commented on June 29, 2024

Hi! I encountered this problem when building a C++ program which refused to link with LTO, and found the solution in the GCC bug tracker: 78613 and 47071. The fix was indeed simple:

diff -up incbin.h~ incbin.h
--- incbin.h~	2018-11-12 09:33:58.000000000 +0100
+++ incbin.h	2021-03-13 17:53:28.552595628 +0100
@@ -216,6 +216,7 @@
             INCBIN_MANGLE INCBIN_STRINGIZE(INCBIN_PREFIX) #NAME "Size:\n" \
                 INCBIN_INT INCBIN_MANGLE INCBIN_STRINGIZE(INCBIN_PREFIX) #NAME "End - " \
                            INCBIN_MANGLE INCBIN_STRINGIZE(INCBIN_PREFIX) #NAME "Data\n" \
+            ".previous" "\n" \
     ); \
     INCBIN_EXTERN(NAME)

..and voilà: no more section mismatches during linking 😄

from incbin.

graphitemaster avatar graphitemaster commented on June 29, 2024

This is a good solution to the problem. I just need to make sure .previous works on all the assembler toolchains.

from incbin.

graphitemaster avatar graphitemaster commented on June 29, 2024

It looks like this is already fixed with resetting back to the .text section so I sense you just have an out of date copy of incbin maybe?

from incbin.

hhoffstaette avatar hhoffstaette commented on June 29, 2024

It looks like this is already fixed with resetting back to the .text section so I sense you just have an out of date copy of incbin maybe?

I used (and patched) the one that came bundled with the source of the package that had problems, and that didn't yet have the fix on master. However said package no loger uses incbin, so .. ¯\_(ツ)_/¯

from incbin.

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.