GithubHelp home page GithubHelp logo

Comments (3)

andysan avatar andysan commented on May 27, 2024

Loading this binary isn't actually supposed to work since the compiled binary is a MACH-O file and not an ELF file. The error message isn't very helpful though. The problem is most likely that find_compatible doesn't handle the case where object_file.create(path) can't find a valid loader and returns None instead of an a loader instance. We should probably raise a ValueError in this case which would be consistent with init_compatible.

from gem5.

BobbyRBruce avatar BobbyRBruce commented on May 27, 2024

Loading this binary isn't actually supposed to work since the compiled binary is a MACH-O file and not an ELF file. The error message isn't very helpful though. The problem is most likely that find_compatible doesn't handle the case where object_file.create(path) can't find a valid loader and returns None instead of an a loader instance. We should probably raise a ValueError in this case which would be consistent with init_compatible.

Ah yes, i was far too caught up in thinking about the ISA without considering other factors.

@ivanaamit has been tasked with looking into making more helpful errors in this code. I'm curious as to if the PowerISA angle is some antiquated code which processes Apple binaries automatically as Power ISA, or if it's just the last condition in an if-else/switch-type statement.

from gem5.

andysan avatar andysan commented on May 27, 2024

Loading this binary isn't actually supposed to work since the compiled binary is a MACH-O file and not an ELF file. The error message isn't very helpful though. The problem is most likely that find_compatible doesn't handle the case where object_file.create(path) can't find a valid loader and returns None instead of an a loader instance. We should probably raise a ValueError in this case which would be consistent with init_compatible.

Ah yes, i was far too caught up in thinking about the ISA without considering other factors.

@ivanaamit has been tasked with looking into making more helpful errors in this code. I'm curious as to if the PowerISA angle is some antiquated code which processes Apple binaries automatically as Power ISA, or if it's just the last condition in an if-else/switch-type statement.

If memory serves me right, the reason the exception comes from PowerISA is that it is the first ISA in the list. Most implementations of _is_compatible_with wouldn't cope correctly with None.

from gem5.

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.