News for hackers. Stuff that matters.
Re:Baby Steps: Slowly Porting Musl to Rust by briansmith on Sunday June 12, 2016 @04:56PM (#11890194)
> Since the Rust standard library depends on libc, I'm not sure how one would properly allow the Rust symbols to replace the linked-in libc symbols while still depending on the rest of libc. Maybe it's not an issue? Maybe there's some magic which could be done?

Static libraries can have circular dependencies like that. For example, in ring[1] I have C code in one static library, which calls some Rust functions in my Rust code. And, that Rust code calls functions in the C static library. The linker...links them together.

[1] https://github.com/briansmith/ring

Re:Baby Steps: Slowly Porting Musl to Rust by dikaiosune on Sunday June 12, 2016 @05:22PM (#11890314)
Circular dependencies are different than duplicate symbols, though, yes? Anyways, my point is not that it's impossible, but that I'm already working at the edge of my knowledge, and I picked the lowest-risk/smallest-chunk pieces of work to get started.
Re:Baby Steps: Slowly Porting Musl to Rust by spc476 on Sunday June 12, 2016 @08:01PM (#11890961)
On Linux, the symbols in glibc are marked as "weak"---that is, if the symbol "malloc" isn't found in another object file, then the one in glibc is used. It's that way so that users can override system provided functions (non-"weak" symbols that are duplicated are considered an error).
Re:Baby Steps: Slowly Porting Musl to Rust by strcat on Sunday June 12, 2016 @11:37PM (#11891584)
Some symbols are. Not all.
Re:Baby Steps: Slowly Porting Musl to Rust by wildmusings on Monday June 13, 2016 @12:14AM (#11891702)
Yes, but you have to be careful to ensure that no two functions are dependent on each other.