Coder Social home page Coder Social logo

Comments (3)

aidanharris avatar aidanharris commented on July 19, 2024

No segfault with sys-devel/mold-2.30.0

from mold.

aidanharris avatar aidanharris commented on July 19, 2024

Seems like the latest commit is what broke things but I don't know enough to know why:

dfa26d08823ca0c8b74773823a4909e988bc6740 is the first bad commit
commit dfa26d08823ca0c8b74773823a4909e988bc6740
Author: Rui Ueyama
Date:   Sun Apr 14 15:03:53 2024 +0900

    1;10;0cGive symbols in .so higher priority than those in .a
    
    Previously, .so and .a were of the same priority and therefore symbols
    in those were resolved based on their positions in the command line;
    whichever file appears first in the command line took precedence.
    
    Here is the problem we are trying to solve with this change: KiCad
    passes unnecessary .a files to the linker along with some .so files.
    Some symbols are defined both by .a and by .so.
    
    If a symbol is resolved from .a, the linker pulls out the file from
    the archive, but because the .a file does not really provide a
    complete set of object files, it ended with "undefined symbol" error.
    
    If a symbol is resolved from .so, everything is fine.
    
    This is arguably a bug in KiCad, or at least depending on the order of
    files in the command line is very fragile. But maybe this change could
    fix the issue without too much side effects. So let's see how it goes.
    
    Fixes https://github.com/rui314/mold/discussions/1234

 elf/input-files.cc       | 38 ++++++++++++++++++++------------------
 elf/input-sections.cc    |  1 +
 test/elf/dso-weak-def.sh | 30 ++++++++++++++++++++++++++++++
 test/elf/link-order.sh   | 22 ----------------------
 4 files changed, 51 insertions(+), 40 deletions(-)
 create mode 100755 test/elf/dso-weak-def.sh
 delete mode 100755 test/elf/link-order.sh
bisect found first bad commit

from mold.

rui314 avatar rui314 commented on July 19, 2024

Thank you for reporting the problem and bisecting. That's the very last commit I've made to the repo, and it also caused very subtle issues to other programs, so I think I need to revert it.

from mold.

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.