Felix Palmen 📯 · @zirias
36 followers · 153 posts · Server techhub.social

@jhx You asked for it, so I'll answer it:

Imho, C++ design is broken from the very beginning. It wanted to provide language constructs, still maintaining full compatibility (which already failed many years ago, cause the languages took different roads).

It combines (IMHO generally a bad idea) with explicit resource management (an *awful* idea, forcing you to use which will in turn mandate creation of purely "technical" classes, just to manage resources).

It wanted , but that's impossible without breaking C compatibility, so it came up with , actually a on steroids.

Overloading also doesn't fit into the simple C library ABI (where symbols are named just like the function), so it came up with "name mangling" ... which is especially horrific because it is *not* standardized.

Ah well, I could go on 😂

#oop #c #exceptions #raii #generics #Templates #preprocessor #linker

Last updated 1 year ago

asmaloney (Andy) 🌎 · @asmaloney
22 followers · 293 posts · Server fosstodon.org

@StompyRobot @zeux And they just changed their license to MIT, so hopefully that will help with contributions & adoption.

github.com/rui314/mold/release

#linker #moldlinker

Last updated 1 year ago

· @AdaPlanet
78 followers · 2797 posts · Server botsin.space

Unable to link C source code with ADA static library (Error: libnewapi.a(unit1.o):unit1.adb:undefined reference to `__gnat_rcheck_CE_Overflow_Check') stackoverflow.com/questions/76 -errors

#ada #programming #linker #gnat #gcc #c

Last updated 1 year ago

Dave Rahardja · @drahardja
1002 followers · 4614 posts · Server sfba.social

question: If I create a dylib libD.dylib that links against static libS.a, by default libD will contain a copy of all (referenced) symbols from S, and any users of libD would not need to link S to get all their needed symbols.

Is there a way to make ld *not* include a copy of S in D (i.e. leave D’s references to symbols in S as unresolved externals)? It’s OK that users of D need to also link S; I want to make sure that there’s only one copy of the contents of S in the final executable.

The obvious answer is to turn S into a dylib as well, but I want to know if there’s actually a way to do what I want.

#clang #ld #linker

Last updated 1 year ago

Ivan, the Language Mangler 🦀 · @hywan
1374 followers · 1494 posts · Server fosstodon.org

Apple has released a new linker, and it's pretty fast, twitter.com/davidecci/status/1 and twitter.com/rui314/status/1665.

They claim it's 5x faster than ld64.

Image showing a benchmark from Rui (mold's author).

It's a good time to continue my work on `weld`, fosstodon.org/@hywan/109783158 and github.com/Hywan/weld.

#apple #linker #performance

Last updated 1 year ago

Simon Racz · @simonracz
21 followers · 55 posts · Server discuss.systems

New Video about Dynamic Loading

Video: youtu.be/VO6gMLtQOKM

Code: github.com/simonracz/dynamic-l

This is mostly for C and C++ devs, although I briefly mention other languages as well.

It's about the dlopen(), dlsym().. APIs and their many use cases.

++

#linux #c #dlopen #linker #dynamic #loading #Java #android #live #streaming

Last updated 2 years ago

Simon Racz · @simonracz
21 followers · 52 posts · Server discuss.systems

Self-Modifying Code in Assembly on Linux. (23 min)

Video: youtu.be/PhMZYrzJBC8

Code: github.com/simonracz/self-modi

#linux #assembly #elf #linker #gdb

Last updated 2 years ago

Alex · @stsquad
259 followers · 1987 posts · Server mastodon.org.uk

An excellent post on the hoop jumping required to get working in . Gives a good overview of what the and need to do: da.vidbuchanan.co.uk/blog/netf

#drm #asahi #linux #loader #linker

Last updated 2 years ago

Tobler · @tobler
7 followers · 426 posts · Server social.anoxinon.de

Ich habe schon früher daran gedacht, aber angesichts der Verweigerung liberaler Politker bei den Koalitionszielen des Bundes fällt mir auf, daß man sehr leicht erkennen kann, mit was für einem Liberalen oder Demokraten man es zu tun hat. Ich glaube fest daran, dass jeder entweder ein stiller oder ein falsch verführter ist. Beim Bundes-Haushaltstheater müssen wir schleunigst herausfinden, wer wer ist, denn das Klima schenkt uns keine Zeit für diese Spiele.

#liberale #rechtsextremist #linker

Last updated 2 years ago

David Cantrell 🏏 · @DrHyde
134 followers · 550 posts · Server fosstodon.org

Well, I say , what it does is concatenate files, occasionally leaving a blank space in between. It’s like how I once manually linked a program by gluing together. It doesn’t resolve any symbols, I use the ’s diagnostic output and a small script to do that and pass the results back in to the assembler so symbols are resolved at “compile” time. The important bit is that all the bytes are in the right place in the ROM image.

#linker #papertapes #assembler #awk

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1266 followers · 1251 posts · Server fosstodon.org

My biggest difficulty with linkers is… understanding their errors! I know I'm not alone.

That's why `weld` must be exemplary on errors, period.

Please welcome `weld-errors`, github.com/Hywan/weld/compare/.

What's new?

* Any error contains a code, a (formatted) message, and a help message,
* `weld` pretty prints those errors,
* `weld --explain <error_code>` gives detailed diagnostics,
* Automatic awesome documentation.

See the screenshots.

#weld #rustlang #error #diagnostics #friendly #linker

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1262 followers · 1236 posts · Server fosstodon.org

`weld` now takes a `--target <triple>` argument. `weld` is designed to be cross-platform entirely, hence it's legit to be able to specify a target triple, github.com/Hywan/weld/commit/b.

Based on the provided target triple, `weld` will use a particular linker strategy (e.g Elf, MachO, Coff, Wasm etc.).

$ weld --target x86-64-unknown-linux <input> -o <output> # = Elf

$ weld --target aarch64-apple-darwin <input> -o <output> # = MachO

Cool huh?

#weld #rustlang #targetlexicon #crossplatform #linker

Last updated 2 years ago

MAS · @MAS
0 followers · 75 posts · Server toot.community
MAS · @MAS
0 followers · 47 posts · Server toot.community
Patrick Van Oosterwijck · @xorbit
63 followers · 259 posts · Server noc.social

The last couple of weeks I've learned more about scripts and the IMXRT1176 boot process than I ever wanted to know. But it's always nice if you get paid to learn. 😄
The culmination today was the creation of a second stage bootloader to be able to load an protected boot image from flash to ECC RAM.

#spi #ecc #nxp #linker

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1182 followers · 1112 posts · Server fosstodon.org

Yesterday, I’ve also added support for big- and little-endian. All parser combinators can now handle endianness based on a generic type + trait, github.com/Hywan/weld/commit/5.

It’s magic. Rust is cool.

#linker #parser #elf #rustlang

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1182 followers · 1111 posts · Server fosstodon.org

So far, I’m writing the Elf64 parser. The goal is to get zero copy, period.

Yesterday I’ve added section’a data and name, still with zero copy, github.com/Hywan/weld/blob/bfb.

It relies heavily on Rust lifetimes, and bstr to get bytes-based string-ish. The parser is written with nom, and is manipulating bytes slices only.

bstr: blog.burntsushi.net/bstr/
nom: github.com/rust-bakery/nom

#linker #parser #elf #rustlang

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1182 followers · 1110 posts · Server fosstodon.org

I’m starting a new project to learn about linkers. It’s called ˋweld`, and it lives here github.com/Hywan/weld.

I do this on my free time; understand very sporadically.

This toot is a thread to show progress or to ask help.

#linker #rustlang

Last updated 2 years ago

Ivan, the Language Mangler 🦀 · @hywan
1139 followers · 1039 posts · Server fosstodon.org

Basic elf64 parser ✅

#linker #rustlang

Last updated 2 years ago

Elizabeth K. Joseph · @pleia2
1087 followers · 268 posts · Server floss.social

"Among the architectures now supported by Mold include DEC Alpha, 32-bit Arm, AArch64, 32-bit x86, m68k, PowerPC 32-bit, PowerPC 64-bit, RISC-V, s390x, SH-4, SPARC 64-bit, and x86_64." 😍 phoronix.com/news/Mold-1.9-Rel

Working with them now to get them set up with a permanent VM so they can continue the support they added in October 2022

#linker #mold #s390x

Last updated 2 years ago