<Entei[m]>
davidlt: With the rebuilt glibc, I the C instructions seem to have disappeared. Of course I didn't inspect the whole objdump output, and this was just a simple hello world program, but still, it looks promising
<Entei[m]>
s/I//
<davidlt[m]>
Entei: you might want to write some script to inspect binaries for C instructions in binaries for some form of validation step.
<Entei[m]>
Yes working on that
<davidlt[m]>
Just remember that not all section in binaries are actually code :)
<Entei[m]>
I did rebuild a simple package called banner, just takes a few mins to build. But that one is full of compressed instructions...
<Entei[m]>
The text section looks clean of compressed instructions.
<Entei[m]>
Does glibc also require --with-arch to be specified? I assumed it's just bunch of libraries, so my gcc could take care of it while building.
jcajka has joined #fedora-riscv
diagprov has quit [Server closed connection]
diagprov has joined #fedora-riscv
kwizart has quit [Server closed connection]
kwizart has joined #fedora-riscv
<davidlt[m]>
At the 1st glance it looks good.
<davidlt[m]>
I don't recall (I constantly forget) what is location in every section.
<davidlt[m]>
Remember that some of these are data, not actual instructions.
<Entei[m]>
<davidlt[m]> "At the 1st glance it looks good." <- That's good to hear. Where do I go from here? Rebuild gcc again with bootstrap?
<davidlt[m]>
I would pick a few more smaller packages to test, just to on a safe side.
<davidlt[m]>
But in general you cannot avoid multiple phases, i.e. mass rebuilds.
<davidlt[m]>
On the 1st mass rebuild you will not get "a clean non-C" build.
<davidlt[m]>
On the 1st round you will be mixing C and non-C, but they use the same ABI thus no issues.
<davidlt[m]>
The more iterations you will do the less there will be C. Most likely pretty much all of it will be gone after 2nd iteration (i.e. phase).
<davidlt[m]>
But you need to have some form of metric to scan, and find the odd ones that managed to fall through the cracks somehow.
<davidlt[m]>
It could be as stupid as objdump .text section and grep for "c." on every single ELF binary.
<Entei[m]>
davidlt[m]: By mass rebuild do you mean all possible in the Rawhide image? Or just the core packages?
<davidlt[m]>
And some point you will reconfigure QEMU VMs to drop C (probably after the 2nd phase).
<davidlt[m]>
So if there are any C generated, that will cause illegal instruction (i.e. easy to notice).
<davidlt[m]>
I would advice to start with packages in @core and then go a bit beyond incl. the most popular packages.
<Entei[m]>
davidlt[m]: Yeah that's my plan as well. I observed qemu-system-riscv64 supports shakti-c core for emulation. It could make it easy to test
<davidlt[m]>
Use virt machine, just change the CPU ISA.