Giter Site home page Giter Site logo

Comments (2)

japaric avatar japaric commented on September 26, 2024

I don't use staticlibs much but I don't think it's going to give you what I think you want to produce: a standalone (archived) (flashable) object file because building staticlibs doesn't involve the linker at all and that's what takes cares of "filling" the undefined references you are seeing.

My understanding is that building staticlibs is just going to (re)archive together all the involved object files but not try to resolve references between them.

What does arm-none-eabi-nm target/arm-none-eabihf/debug/libtyran.a | grep "T " output? I expect you'll see some of the "undefined" symbol in there. e.g. T __aeabi_uidiv (note: that's a "defined" symbol).

from compiler-builtins.

turnage avatar turnage commented on September 26, 2024

I did not know that building static libs did not invoke the linker!

The offending code that was creating references to compiler-rt symbols was:

for i in 0..10 {}

When building an rlib, this code stopped creating references to compiler-rt symbols (I am not depending on this repo anymore).

There were still the following undefined symbols:

undefined reference to `core::panicking::panic::h86aded962ecadfcc'
undefined reference to `__aeabi_unwind_cpp_pr0'
undefined reference to `_Unwind_Resume'

But these references were removed with lto.

Thank you for the response @japaric!

from compiler-builtins.

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.