[klibc] Make typesize extraction more robust

Petr writes:

> Problem: binary (typesize.bin) created from object file (typesize.o)
> with 'objcopy -O binary ... '. But typesize.o has relocatable objects that all
> copied with offset 0. This will lead to overlapping sections in binary.

Avoid this by telling objcopy that we only want the read-only data
(.rodata) section.

Reported-by: Petr Ovtchenkov <ptr@void-ptr.info>
References: https://lists.zytor.com/archives/klibc/2021-February/004582.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 file changed